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

Unified Diff: chrome/browser/resources/gpu_internals/browser_bridge.js

Issue 6551019: Trace_event upgrades (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More gooder js thanks to arv. Created 9 years, 10 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/browser/resources/gpu_internals/browser_bridge.js
diff --git a/chrome/browser/resources/gpu_internals/browser_bridge.js b/chrome/browser/resources/gpu_internals/browser_bridge.js
index 1b1e23b90a45a37d2e8be1aa11200bb05695f7bc..ed73b0a364a1f3ff5176325a7722966482c137b0 100644
--- a/chrome/browser/resources/gpu_internals/browser_bridge.js
+++ b/chrome/browser/resources/gpu_internals/browser_bridge.js
@@ -12,9 +12,12 @@ cr.define('gpu', function() {
// If we are not running inside WebUI, output chrome.send messages
// to the console to help with quick-iteration debugging.
if (chrome.send === undefined && console.log) {
+ this.debugMode_ = true;
chrome.send = function(messageHandler, args) {
console.log('chrome.send', messageHandler, args);
};
+ } else {
+ this.debugMode_ = false;
}
this.nextRequestId_ = 0;
@@ -25,6 +28,14 @@ cr.define('gpu', function() {
__proto__: Object.prototype,
/**
+ * Returns true if the page is hosted inside Chrome WebUI
+ * Helps have behavior conditional to emulate_webui.py
+ */
+ get debugMode() {
+ return this.debugMode_;
+ },
+
+ /**
* Sends a message to the browser with specified args. The
* browser will reply asynchronously via the provided callback.
*/

Powered by Google App Engine
This is Rietveld 408576698