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.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

33 lines
794 B

import CommonComponent from '../common';
import FollowController from './follow-controller';
import * as consoleFrames from '../../console-frames';
import messages from 'shared/messages';
export default class TopContent {
constructor(win, store) {
this.win = win;
this.children = [
new CommonComponent(win, store),
new FollowController(win, store),
];
// TODO make component
consoleFrames.initialize(window.document);
}
update() {
this.children.forEach(c => c.update());
}
onMessage(message, sender) {
switch (message.type) {
case messages.CONSOLE_HIDE_COMMAND:
this.win.focus();
consoleFrames.blur(window.document);
return Promise.resolve();
}
this.children.forEach(c => c.onMessage(message, sender));
}
}