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

Side by Side Diff: chrome/renderer/resources/extension_process_bindings.js

Issue 276010: Remove the implicit wrench menu items for browser actions. (Closed)
Patch Set: Rebase Created 11 years, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2009 The chrome Authors. All rights reserved. 1 // Copyright (c) 2009 The chrome Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // This script contains privileged chrome extension related javascript APIs. 5 // This script contains privileged chrome extension related javascript APIs.
6 // It is loaded by pages whose URL has the chrome-extension protocol. 6 // It is loaded by pages whose URL has the chrome-extension protocol.
7 7
8 var chrome = chrome || {}; 8 var chrome = chrome || {};
9 (function() { 9 (function() {
10 native function GetExtensionAPIDefinition(); 10 native function GetExtensionAPIDefinition();
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 // constructor is not public. 342 // constructor is not public.
343 // 343 //
344 // We do this manually instead of using JSONSchema to avoid having these 344 // We do this manually instead of using JSONSchema to avoid having these
345 // properties show up in the doc. 345 // properties show up in the doc.
346 if (!("width" in details.imageData) || 346 if (!("width" in details.imageData) ||
347 !("height" in details.imageData) || 347 !("height" in details.imageData) ||
348 !("data" in details.imageData)) { 348 !("data" in details.imageData)) {
349 throw new Error( 349 throw new Error(
350 "The imageData property must contain an ImageData object."); 350 "The imageData property must contain an ImageData object.");
351 } 351 }
352
352 sendCustomRequest(SetBrowserActionIcon, "browserAction.setIcon", 353 sendCustomRequest(SetBrowserActionIcon, "browserAction.setIcon",
353 details, this.definition.parameters); 354 details, this.definition.parameters);
354 } else { 355 } else {
355 throw new Error( 356 throw new Error(
356 "Either the iconIndex or imageData property must be specified."); 357 "Either the iconIndex or imageData property must be specified.");
357 } 358 }
358 } 359 }
359 360
360 setupBrowserActionEvent(extensionId); 361 setupBrowserActionEvent(extensionId);
361 setupPageActionEvents(extensionId); 362 setupPageActionEvents(extensionId);
362 setupToolstripEvents(GetRenderViewId()); 363 setupToolstripEvents(GetRenderViewId());
363 }); 364 });
364 })(); 365 })();
OLDNEW
« no previous file with comments | « chrome/common/extensions/extension_action.cc ('k') | chrome/test/data/extensions/api_test/browser_action/background.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698