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

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

Issue 144019: Functionality has been requested in the Extension API for Javascript to... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 11 years, 5 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 | Annotate | Revision Log
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 // ----------------------------------------------------------------------------- 5 // -----------------------------------------------------------------------------
6 // NOTE: If you change this file you need to touch renderer_resources.grd to 6 // NOTE: If you change this file you need to touch renderer_resources.grd to
7 // have your change take effect. 7 // have your change take effect.
8 // ----------------------------------------------------------------------------- 8 // -----------------------------------------------------------------------------
9 9
10 // This script contains privileged chrome extension related javascript APIs. 10 // This script contains privileged chrome extension related javascript APIs.
11 // It is loaded by pages whose URL has the chrome-extension protocol. 11 // It is loaded by pages whose URL has the chrome-extension protocol.
12 12
13 var chrome = chrome || {}; 13 var chrome = chrome || {};
14 (function() { 14 (function() {
15 native function GetViews(); 15 native function GetViews();
16 native function GetWindow(); 16 native function GetWindow();
17 native function GetCurrentWindow(); 17 native function GetCurrentWindow();
18 native function GetLastFocusedWindow(); 18 native function GetLastFocusedWindow();
19 native function CreateWindow(); 19 native function CreateWindow();
20 native function UpdateWindow(); 20 native function UpdateWindow();
21 native function RemoveWindow(); 21 native function RemoveWindow();
22 native function GetAllWindows(); 22 native function GetAllWindows();
23 native function GetTab(); 23 native function GetTab();
24 native function GetSelectedTab(); 24 native function GetSelectedTab();
25 native function GetAllTabsInWindow(); 25 native function GetAllTabsInWindow();
26 native function CreateTab(); 26 native function CreateTab();
27 native function UpdateTab(); 27 native function UpdateTab();
28 native function MoveTab(); 28 native function MoveTab();
29 native function RemoveTab(); 29 native function RemoveTab();
30 native function GetVisibleTabCapture();
30 native function GetTabLanguage(); 31 native function GetTabLanguage();
31 native function EnablePageAction(); 32 native function EnablePageAction();
32 native function DisablePageAction(); 33 native function DisablePageAction();
33 native function GetCurrentPageActions(); 34 native function GetCurrentPageActions();
34 native function GetBookmarks(); 35 native function GetBookmarks();
35 native function GetBookmarkChildren(); 36 native function GetBookmarkChildren();
36 native function GetBookmarkTree(); 37 native function GetBookmarkTree();
37 native function SearchBookmarks(); 38 native function SearchBookmarks();
38 native function RemoveBookmark(); 39 native function RemoveBookmark();
39 native function CreateBookmark(); 40 native function CreateBookmark();
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 chrome.tabs.remove = function(tabId, callback) { 312 chrome.tabs.remove = function(tabId, callback) {
312 validate(arguments, arguments.callee.params); 313 validate(arguments, arguments.callee.params);
313 sendRequest(RemoveTab, tabId, callback); 314 sendRequest(RemoveTab, tabId, callback);
314 }; 315 };
315 316
316 chrome.tabs.remove.params = [ 317 chrome.tabs.remove.params = [
317 chrome.types.pInt, 318 chrome.types.pInt,
318 chrome.types.optFun 319 chrome.types.optFun
319 ]; 320 ];
320 321
322 chrome.tabs.getVisibleTabCapture = function(windowId, callback) {
Aaron Boodman 2009/07/30 18:15:12 Shouldn't this be in api.json now?
Aaron Boodman 2009/07/30 18:15:12 Can we change the name to captureVisibleTab()?
323 validate(arguments, arguments.callee.params);
324 sendRequest(GetVisibleTabCapture, windowId, callback);
325 };
326
327 chrome.tabs.getVisibleTabCapture.params = [
328 chrome.types.optPInt,
329 chrome.types.fun
330 ];
331
321 chrome.tabs.getLanguage = function(tabId, callback) { 332 chrome.tabs.getLanguage = function(tabId, callback) {
322 validate(arguments, arguments.callee.params); 333 validate(arguments, arguments.callee.params);
323 sendRequest(GetTabLanguage, tabId, callback); 334 sendRequest(GetTabLanguage, tabId, callback);
324 }; 335 };
325 336
326 chrome.tabs.getLanguage.params = [ 337 chrome.tabs.getLanguage.params = [
327 chrome.types.optPInt, 338 chrome.types.optPInt,
328 chrome.types.optFun 339 chrome.types.optFun
329 ]; 340 ];
330 341
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
557 // http://code.google.com/p/chromium/issues/detail?id=16356 568 // http://code.google.com/p/chromium/issues/detail?id=16356
558 chrome.self.onConnect = new chrome.Event("channel-connect:" + extensionId); 569 chrome.self.onConnect = new chrome.Event("channel-connect:" + extensionId);
559 570
560 setupPageActionEvents(extensionId); 571 setupPageActionEvents(extensionId);
561 }); 572 });
562 573
563 chrome.self.getViews = function() { 574 chrome.self.getViews = function() {
564 return GetViews(); 575 return GetViews();
565 } 576 }
566 })(); 577 })();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698