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

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

Issue 159882: Implements extensions devtools API (Closed)
Patch Set: Fixes flakiness in tests by grabbing tab ID in C++ land and passing it down Created 11 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 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 // ----------------------------------------------------------------------------- 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.
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 return GetExtensionViews(windowId, "TOOLSTRIP"); 274 return GetExtensionViews(windowId, "TOOLSTRIP");
275 } 275 }
276 276
277 apiFunctions["extension.getTabContentses"].handleRequest = 277 apiFunctions["extension.getTabContentses"].handleRequest =
278 function(windowId) { 278 function(windowId) {
279 if (typeof(windowId) == "undefined") 279 if (typeof(windowId) == "undefined")
280 windowId = -1; 280 windowId = -1;
281 return GetExtensionViews(windowId, "TAB"); 281 return GetExtensionViews(windowId, "TAB");
282 } 282 }
283 283
284 apiFunctions["devtools.getTabEvents"].handleRequest = function(tabId) {
285 var tabIdProxy = {};
286 forEach(["onPageEvent", "onTabUrlChange", "onTabClose"],
287 function(name) {
288 // Event disambiguation is handled by name munging. See
289 // chrome/browser/extensions/extension_devtools_events.h for the C++
290 // equivalent of this logic.
291 tabIdProxy[name] = new chrome.Event("devtools." + tabId + "." + name);
292 });
293 return tabIdProxy;
294 }
295
284 setupPageActionEvents(extensionId); 296 setupPageActionEvents(extensionId);
285 }); 297 });
286 })(); 298 })();
OLDNEW
« no previous file with comments | « chrome/renderer/renderer_resources.grd ('k') | chrome/test/data/extensions/devtools/timeline_api/background.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698