bindings = process.atomBinding 'app'
+objectsRegistry = require '../../atom/objects-registry.js'
EventEmitter = require('events').EventEmitter
Application = bindings.Application
app.getHomeDir = ->
process.env[if process.platform is 'win32' then 'USERPROFILE' else 'HOME']
+app.getBrowserWindows = ->
+ objectsRegistry.getAllWindows()
+
app.commandLine =
appendSwitch: bindings.appendSwitch,
appendArgument: bindings.appendArgument
EventEmitter = require('events').EventEmitter
+app = require 'app'
v8Util = process.atomBinding 'v8_util'
-objectsRegistry = require '../../atom/objects-registry.js'
BrowserWindow = process.atomBinding('window').BrowserWindow
BrowserWindow::__proto__ = EventEmitter.prototype
@menu.attachToWindow this
BrowserWindow.getFocusedWindow = ->
- windows = objectsRegistry.getAllWindows()
+ windows = app.getBrowserWindows()
return window for window in windows when window.isFocused()
BrowserWindow.fromProcessIdAndRoutingId = (processId, routingId) ->
- windows = objectsRegistry.getAllWindows()
+ windows = app.getBrowserWindows()
return window for window in windows when window.getProcessId() == processId and
window.getRoutingId() == routingId
Returns the version of current bundle or executable.
+## app.getBrowserWindows()
+
+Returns an array of all browser windows.
+
## app.commandLine.appendSwitch(switch, [value])
Append a switch [with optional value] to Chromium's command line.