From: Cheng Zhao Date: Fri, 4 Apr 2014 14:28:47 +0000 (+0800) Subject: Make remote.getCurrentWindow work for devtools. X-Git-Tag: v0.11.6~7^2~5 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=03e6d564d776cd1d2018cdc33c99f41e4553da09;p=electron.git Make remote.getCurrentWindow work for devtools. --- diff --git a/atom/browser/lib/rpc-server.coffee b/atom/browser/lib/rpc-server.coffee index 6e072b66..e10f8753 100644 --- a/atom/browser/lib/rpc-server.coffee +++ b/atom/browser/lib/rpc-server.coffee @@ -98,6 +98,7 @@ ipc.on 'ATOM_BROWSER_CURRENT_WINDOW', (event, processId, routingId) -> try BrowserWindow = require 'browser-window' window = BrowserWindow.fromProcessIdAndRoutingId processId, routingId + window = BrowserWindow.fromDevTools processId, routingId unless window? event.returnValue = valueToMeta processId, routingId, window catch e event.returnValue = errorToMeta e