Index: chrome/browser/resources/tracing/tracing_controller.js |
diff --git a/chrome/browser/resources/tracing/tracing_controller.js b/chrome/browser/resources/tracing/tracing_controller.js |
index 494cf6852b66f340191dc7640fe933020a4b6cf8..4d924aeb857cf5cc2595a4812589ee11308d06b8 100644 |
--- a/chrome/browser/resources/tracing/tracing_controller.js |
+++ b/chrome/browser/resources/tracing/tracing_controller.js |
@@ -36,11 +36,15 @@ cr.define('tracing', function() { |
this.onKeydownBoundToThis_ = this.onKeydown_.bind(this); |
this.onKeypressBoundToThis_ = this.onKeypress_.bind(this); |
+ |
+ chrome.send('tracingControllerInitialized'); |
} |
TracingController.prototype = { |
__proto__: cr.EventTarget.prototype, |
+ gpuInfo_: undefined, |
+ clientInfo_: undefined, |
tracingEnabled_: false, |
tracingEnding_: false, |
@@ -109,6 +113,21 @@ cr.define('tracing', function() { |
this.endTracing(); |
} |
}, |
+ |
+ /** |
+ * Called from gpu c++ code when ClientInfo is updated. |
+ */ |
+ onClientInfoUpdate: function(clientInfo) { |
+ this.clientInfo_ = clientInfo; |
+ }, |
+ |
+ /** |
+ * Called from gpu c++ code when GPU Info is updated. |
+ */ |
+ onGpuInfoUpdate: function(gpuInfo) { |
+ this.gpuInfo_ = gpuInfo; |
+ }, |
+ |
/** |
* Checks whether tracing is enabled |
*/ |
@@ -208,8 +227,8 @@ cr.define('tracing', function() { |
beginSaveTraceFile: function(traceEvents) { |
var data = { |
traceEvents: traceEvents, |
- clientInfo: browserBridge.clientInfo, |
- gpuInfo: browserBridge.gpuInfo |
+ clientInfo: this.clientInfo_, |
+ gpuInfo: this.gpuInfo_ |
}; |
chrome.send('saveTraceFile', [JSON.stringify(data)]); |
}, |