 
 # Manages the displayed items.
 # Communicates with @see View instances running in the context of the UI's frame.
-class ViewManager
+class ViewManager extends EventTarget
   # The list of items displayed in the toolbar.
   # @private
   displayedItems : []

  # Helper method to create the toolbar UI
  # @private
  createUI : =>
    @frame = Frame({
      url: './ticker.html'
      onMessage: @onReceiveMessage
    })
    @itemSpecific = []
    @menu = new Menu({ onHide: @resetMenu }, [
      new MenuItem({ label: _('refresh_feeds') }),
      Menu.Separator,
      @itemSpecific[...0] = new MenuItem({ label: _('open_feed_in_tabs'), disabled: true }),
      new MenuItem({ label: _('open_all_in_tabs') }),
      Menu.Separator,
      @itemSpecific[...0] = new MenuItem({ label: _('mark_item_read'), disabled: true }),
      @itemSpecific[...0] = new MenuItem({ label: _('mark_feed_read'), disabled: true }),
      new MenuItem({ label: _('mark_all_read') })
    ])

  # Helper method for communication with the @see View instances

{ Frame } = require('sdk/ui/frame')
{ Toolbar } = require('sdk/ui/toolbar')
{ Panel } = require('sdk/panel')

{ EventTarget } = require('sdk/event/target')
{ emit } = require('sdk/event/core')

preferences = require('sdk/simple-prefs').prefs
{ identify } = require('sdk/ui/id')
_ = require('sdk/l10n').get
