Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4246)

Unified Diff: chrome/renderer/resources/extensions/bluetooth_custom_bindings.js

Issue 15841013: Make miscellaneous_bindings and event_bindings Required as needed. Previously (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/renderer/resources/extensions/bluetooth_custom_bindings.js
diff --git a/chrome/renderer/resources/extensions/bluetooth_custom_bindings.js b/chrome/renderer/resources/extensions/bluetooth_custom_bindings.js
index fe8cc13b5961265d147631cb79693500750f3c39..2760d25a1457771d9047f4a6f00393b546aa2ed8 100644
--- a/chrome/renderer/resources/extensions/bluetooth_custom_bindings.js
+++ b/chrome/renderer/resources/extensions/bluetooth_custom_bindings.js
@@ -8,8 +8,9 @@ var binding = require('binding').Binding.create('bluetooth');
var chromeHidden = requireNative('chrome_hidden').GetChromeHidden();
var chrome = requireNative('chrome').GetChrome();
-var sendRequest = require('sendRequest').sendRequest;
+var Event = require('event_bindings').Event;
var lastError = require('lastError');
+var sendRequest = require('sendRequest').sendRequest;
// Use custom binding to create an undocumented event listener that will
// receive events about device discovery and call the event listener that was
@@ -27,7 +28,7 @@ binding.registerCustomHook(function(api) {
chromeHidden.bluetooth.deviceDiscoveredHandler = null;
chromeHidden.bluetooth.onDeviceDiscovered =
- new chrome.Event('bluetooth.onDeviceDiscovered');
+ new Event('bluetooth.onDeviceDiscovered');
function clearDeviceDiscoveredHandler() {
chromeHidden.bluetooth.onDeviceDiscovered.removeListener(
chromeHidden.bluetooth.deviceDiscoveredHandler);
@@ -78,9 +79,9 @@ binding.registerCustomHook(function(api) {
// Hidden events used to deliver getDevices data to the client callbacks
chromeHidden.bluetooth.onDeviceSearchResult =
- new chrome.Event('bluetooth.onDeviceSearchResult');
+ new Event('bluetooth.onDeviceSearchResult');
chromeHidden.bluetooth.onDeviceSearchFinished =
- new chrome.Event('bluetooth.onDeviceSearchFinished');
+ new Event('bluetooth.onDeviceSearchFinished');
function deviceSearchResultHandler(device) {
chromeHidden.bluetooth.getDevicesState.actualEvents++;
« no previous file with comments | « chrome/renderer/resources/extensions/binding.js ('k') | chrome/renderer/resources/extensions/chrome_setting.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698