function BrowserBridge() {
    // If we are not running inside WebUI, output chrome.send messages
    // to the console to help with quick-iteration debugging.
    this.debugMode_ = (chrome.send === undefined && console.log);
    if (this.debugMode_) {
      var browserBridgeTests = document.createElement('script');
      browserBridgeTests.src = './gpu_internals/browser_bridge_tests.js';
      document.body.appendChild(browserBridgeTests);
    }

    this.nextRequestId_ = 0;
    this.pendingCallbacks_ = [];
    this.logMessages_ = [];

    // Tell c++ code that we are ready to receive GPU Info.
    if (!this.debugMode_) {
      chrome.send('browserBridgeInitialized');
      this.beginRequestClientInfo_();
      this.beginRequestLogMessages_();
    }
  }
/**
   * This class provides a 'bridge' for communicating between javascript and the
   * browser. When run outside of WebUI, e.g. as a regular webpage, it provides
   * synthetic data to assist in testing.
   * @constructor
   */
This class provides a 'bridge' for communicating between javascript and the
browser. When run outside of WebUI, e.g. as a regular webpage, it provides
synthetic data to assist in testing.
@constructor
This class provides a ' bridge ' for communicating between javascript and the browser . When run outside of WebUI e . g . as a regular webpage it provides synthetic data to assist in testing . @constructor
function BrowserBridge() {
    this.debugMode_ = (chrome.send === undefined && console.log);
    if (this.debugMode_) {
      var browserBridgeTests = document.createElement('script');
      browserBridgeTests.src = './gpu_internals/browser_bridge_tests.js';
      document.body.appendChild(browserBridgeTests);
    }
    this.nextRequestId_ = 0;
    this.pendingCallbacks_ = [];
    this.logMessages_ = [];
    if (!this.debugMode_) {
      chrome.send('browserBridgeInitialized');
      this.beginRequestClientInfo_();
      this.beginRequestLogMessages_();
    }
  }
function BrowserBridge ( ) { this . debugMode_ = ( chrome . send === undefined && console . log ) ; if ( this . debugMode_ ) { var browserBridgeTests = document . createElement ( 'script' ) ; browserBridgeTests . src = './gpu_internals/browser_bridge_tests.js' ; document . body . appendChild ( browserBridgeTests ) ; } this . nextRequestId_ = 0 ; this . pendingCallbacks_ = [ ] ; this . logMessages_ = [ ] ; if ( ! this . debugMode_ ) { chrome . send ( 'browserBridgeInitialized' ) ; this . beginRequestClientInfo_ ( ) ; this . beginRequestLogMessages_ ( ) ; } }
This class provides a 'bridge' for communicating between javascript and the
 browser.
This class provides a ' bridge ' for communicating between javascript and the browser .
// If we are not running inside WebUI, output chrome.send messages // to the console to help with quick-iteration debugging. // Tell c++ code that we are ready to receive GPU Info.