A fork of https://github.com/ueokande/vim-vixen
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
794 B
33 lines
794 B
7 years ago
|
import CommonComponent from '../common';
|
||
|
import FollowController from './follow-controller';
|
||
|
import * as consoleFrames from '../../console-frames';
|
||
7 years ago
|
import messages from 'shared/messages';
|
||
|
|
||
|
export default class TopContent {
|
||
|
|
||
|
constructor(win, store) {
|
||
|
this.win = win;
|
||
7 years ago
|
this.children = [
|
||
|
new CommonComponent(win, store),
|
||
|
new FollowController(win, store),
|
||
|
];
|
||
7 years ago
|
|
||
|
// TODO make component
|
||
|
consoleFrames.initialize(window.document);
|
||
|
}
|
||
|
|
||
|
update() {
|
||
|
this.children.forEach(c => c.update());
|
||
|
}
|
||
|
|
||
7 years ago
|
onMessage(message, sender) {
|
||
7 years ago
|
switch (message.type) {
|
||
|
case messages.CONSOLE_HIDE_COMMAND:
|
||
|
this.win.focus();
|
||
|
consoleFrames.blur(window.document);
|
||
|
return Promise.resolve();
|
||
|
}
|
||
7 years ago
|
this.children.forEach(c => c.onMessage(message, sender));
|
||
7 years ago
|
}
|
||
|
}
|