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

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

Issue 7640005: Add a Print() method to bindings JS for last resort debugging. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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 | Annotate | Revision Log
« no previous file with comments | « chrome/renderer/resources/extension_process_bindings.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium 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 unprivileged javascript APIs related to chrome 5 // This script contains unprivileged javascript APIs related to chrome
6 // extensions. It is loaded by any extension-related context, such as content 6 // extensions. It is loaded by any extension-related context, such as content
7 // scripts or toolstrips. 7 // scripts or toolstrips.
8 // See user_script_slave.cc for script that is loaded by content scripts only. 8 // See user_script_slave.cc for script that is loaded by content scripts only.
9 // TODO(mpcomplete): we also load this in regular web pages, but don't need to. 9 // TODO(mpcomplete): we also load this in regular web pages, but don't need to.
10 10
11 var chrome = chrome || {}; 11 var chrome = chrome || {};
12 (function () { 12 (function () {
13 native function OpenChannelToExtension(sourceId, targetId, name); 13 native function OpenChannelToExtension(sourceId, targetId, name);
14 native function CloseChannel(portId, notifyBrowser); 14 native function CloseChannel(portId, notifyBrowser);
15 native function PortAddRef(portId); 15 native function PortAddRef(portId);
16 native function PortRelease(portId); 16 native function PortRelease(portId);
17 native function PostMessage(portId, msg); 17 native function PostMessage(portId, msg);
18 native function GetChromeHidden(); 18 native function GetChromeHidden();
19 native function GetL10nMessage(); 19 native function GetL10nMessage();
20 native function Print();
20 21
21 var chromeHidden = GetChromeHidden(); 22 var chromeHidden = GetChromeHidden();
22 23
23 // The reserved channel name for the sendRequest API. 24 // The reserved channel name for the sendRequest API.
24 chromeHidden.kRequestChannel = "chrome.extension.sendRequest"; 25 chromeHidden.kRequestChannel = "chrome.extension.sendRequest";
25 26
26 // Map of port IDs to port object. 27 // Map of port IDs to port object.
27 var ports = {}; 28 var ports = {};
28 29
29 // Map of port IDs to chromeHidden.onUnload listeners. Keep track of these 30 // Map of port IDs to chromeHidden.onUnload listeners. Keep track of these
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 "extension.onRequestExternal", 352 "extension.onRequestExternal",
352 "extension.setUpdateUrlData", 353 "extension.setUpdateUrlData",
353 "i18n.getAcceptLanguages" 354 "i18n.getAcceptLanguages"
354 ]; 355 ];
355 for (var i = 0; i < privileged.length; i++) { 356 for (var i = 0; i < privileged.length; i++) {
356 createStub(privileged[i]); 357 createStub(privileged[i]);
357 } 358 }
358 } 359 }
359 360
360 })(); 361 })();
OLDNEW
« no previous file with comments | « chrome/renderer/resources/extension_process_bindings.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698