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

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

Issue 10170001: Find feature for tracing, at long last. (Closed) Base URL: git://localhost/home/nduca/Local/chrome/src@master
Patch Set: patch for landing Created 8 years, 8 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/tracing/profiling_view.js
diff --git a/chrome/browser/resources/tracing/profiling_view.js b/chrome/browser/resources/tracing/profiling_view.js
index 2d2cf6cddba0740dd3aa41e7d7af9a022745a4ff..1fdc7914899f38e39c02e068d834c44d39028130 100644
--- a/chrome/browser/resources/tracing/profiling_view.js
+++ b/chrome/browser/resources/tracing/profiling_view.js
@@ -5,8 +5,8 @@
'use strict';
/**
- * @fileoverview ProfilingView visualizes TRACE_EVENT events using the
- * tracing.Timeline component.
+ * @fileoverview ProfilingView glues the TimelineView control to
+ * TracingController.
*/
cr.define('tracing', function() {
/**
@@ -27,13 +27,6 @@ cr.define('tracing', function() {
this.classList.add('profiling-view');
// make the <list>/add/save/record element
- this.controlDiv_ = document.createElement('div');
- this.controlDiv_.className = 'control';
- this.appendChild(this.controlDiv_);
-
- var tracingEl = document.createElement('span');
- tracingEl.textContent = 'Tracing: ';
-
this.recordBn_ = document.createElement('button');
this.recordBn_.className = 'record';
this.recordBn_.textContent = 'Record';
@@ -47,16 +40,6 @@ cr.define('tracing', function() {
this.loadBn_.textContent = 'Load';
this.loadBn_.addEventListener('click', this.onLoad_.bind(this));
- this.container_ = document.createElement('div');
- this.container_.className = 'container';
-
- this.timelineView_ = new tracing.TimelineView();
-
- this.controlDiv_.appendChild(tracingEl);
- this.controlDiv_.appendChild(this.recordBn_);
- this.controlDiv_.appendChild(this.loadBn_);
- this.controlDiv_.appendChild(this.saveBn_);
-
if (cr.isChromeOS) {
this.systemTracingBn_ = document.createElement('input');
this.systemTracingBn_.type = 'checkbox';
@@ -66,12 +49,16 @@ cr.define('tracing', function() {
systemTracingLabelEl.className = 'label';
systemTracingLabelEl.textContent = 'System events';
systemTracingLabelEl.appendChild(this.systemTracingBn_);
-
- this.controlDiv_.appendChild(systemTracingLabelEl);
}
- this.container_.appendChild(this.timelineView_);
- this.appendChild(this.container_);
+ this.timelineView_ = new tracing.TimelineView();
+ this.timelineView_.leftControls.appendChild(this.recordBn_);
+ this.timelineView_.leftControls.appendChild(this.saveBn_);
+ this.timelineView_.leftControls.appendChild(this.loadBn_);
+ if (cr.isChromeOS)
+ this.timelineView_.leftControls.appendChild(this.systemTracingBn_);
+
+ this.appendChild(this.timelineView_);
document.addEventListener('keypress', this.onKeypress_.bind(this));
« no previous file with comments | « chrome/browser/resources/tracing/profiling_view.css ('k') | chrome/browser/resources/tracing/profiling_view_test.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698