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

Unified Diff: chrome/browser/resources/tracing/tracing_controller.js

Issue 7497049: Quick-fixes to about:tracing following move (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More minor tweaks 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/resources/tracing/timeline_track.js ('k') | chrome/browser/ui/webui/tracing_ui.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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)]);
},
« no previous file with comments | « chrome/browser/resources/tracing/timeline_track.js ('k') | chrome/browser/ui/webui/tracing_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698