 
 _ = require 'underscore-plus'
 {deprecate} = require 'grim'
-{CompositeDisposable, Emitter} = require 'event-kit'
+{CompositeDisposable, Disposable, Emitter} = require 'event-kit'
 fs = require 'fs-plus'
 {mapSourcePosition} = require 'source-map-support'
 Model = require './model'

  constructor: (params={}) ->
    {@blobStore, @applicationDelegate, @window, @document, configDirPath, @enablePersistence, onlyLoadBaseStyleSheets} = params

    debouncedSaveState = _.debounce((=> @saveState()), @saveStateDebounceInterval)
    @document.addEventListener('mousedown', debouncedSaveState, true)
    @document.addEventListener('keydown', debouncedSaveState, true)


    @loadTime = null
    {devMode, safeMode, resourcePath} = @getLoadSettings()


    @registerDefaultViewProviders()

    @installUncaughtErrorHandler()
    @attachSaveStateListeners()
    @installWindowEventHandler()

    @observeAutoHideMenuBar()
