Skip to content
This repository has been archived by the owner on Jan 4, 2019. It is now read-only.

Commit

Permalink
Implements chrome.windows.create
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathansampson committed Sep 5, 2017
1 parent 602f560 commit 49afc2b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
9 changes: 5 additions & 4 deletions atom/common/api/resources/windows_bindings.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
var binding = require('binding').Binding.create('windows')

var ipc = require('ipc_utils')
var ipc = require('ipc_utils');
var binding = require('binding').Binding.create('windows');
var process = requireNative('process');
var extensionId = process.GetExtensionId();

var id = 1;

Expand All @@ -21,7 +22,7 @@ binding.registerCustomHook(function (bindingsAPI, extensionId) {
})

apiFunctions.setHandleRequest('create', function (createData, cb) {
console.warn('chrome.windows.create is not supported yet')
ipc.send('chrome-windows-create', extensionId, createData)
})

apiFunctions.setHandleRequest('getCurrent', function () {
Expand Down
4 changes: 4 additions & 0 deletions lib/browser/api/extensions.js
Original file line number Diff line number Diff line change
Expand Up @@ -653,6 +653,10 @@ ipcMain.on('chrome-windows-update', function (evt, responseId, windowId, updateI
evt.sender.send('chrome-windows-update-response-' + responseId, response)
})

ipcMain.on('chrome-windows-create', function (evt, extensionId, createData) {
process.emit('chrome-windows-create', extensionId, createData)
})

// chrome.browserAction

ipcMain.on('chrome-browser-action-set-badge-background-color', function (evt, extensionId, details) {
Expand Down

0 comments on commit 49afc2b

Please sign in to comment.