| 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.
|
| */
|
|
|