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

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

Issue 477193003: Refactor setIcon to allow for more general use of imageData (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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/browser_action_custom_bindings.js
diff --git a/chrome/renderer/resources/extensions/browser_action_custom_bindings.js b/chrome/renderer/resources/extensions/browser_action_custom_bindings.js
index 60ac0c3b531e7cc50a12e583d6e464986f5a0c4f..66e5fcd0219ebb6b4c812af8567181a99d0c0a16 100644
--- a/chrome/renderer/resources/extensions/browser_action_custom_bindings.js
+++ b/chrome/renderer/resources/extensions/browser_action_custom_bindings.js
@@ -8,13 +8,15 @@ var binding = require('binding').Binding.create('browserAction');
var setIcon = require('setIcon').setIcon;
var getExtensionViews = requireNative('runtime').GetExtensionViews;
+var sendRequest = require('sendRequest').sendRequest;
binding.registerCustomHook(function(bindingsAPI) {
not at google - send to devlin 2014/08/19 00:04:43 What about page_action_custom_bindings.js?
gpdavis 2014/08/19 00:54:15 Good point. Done.
var apiFunctions = bindingsAPI.apiFunctions;
apiFunctions.setHandleRequest('setIcon', function(details, callback) {
- setIcon(details, callback, this.name, this.definition.parameters,
- 'browser action');
+ setIcon(details, 'browser_action', function(args) {
+ sendRequest(this.name, [args, callback], this.definition.parameters);
+ }.bind(this));
});
apiFunctions.setCustomCallback('openPopup',

Powered by Google App Engine
This is Rietveld 408576698