| Index: tracing/tracing/ui/extras/about_tracing/profiling_view.html
|
| diff --git a/tracing/tracing/ui/extras/about_tracing/profiling_view.html b/tracing/tracing/ui/extras/about_tracing/profiling_view.html
|
| index 205d84816f6839ea9ba86675bab8a97801df5252..1e6f06c6a2716cbb4a7967a86e88cd5152db45e3 100644
|
| --- a/tracing/tracing/ui/extras/about_tracing/profiling_view.html
|
| +++ b/tracing/tracing/ui/extras/about_tracing/profiling_view.html
|
| @@ -7,7 +7,7 @@ found in the LICENSE file.
|
|
|
| <link rel="import" href="/tracing/base/base64.html">
|
| <link rel="import"
|
| - href="/tracing/ui/extras/about_tracing/record_and_capture_controller.html">
|
| + href="/tracing/ui/extras/about_tracing/record_controller.html">
|
| <link rel="import"
|
| href="/tracing/ui/extras/about_tracing/inspector_tracing_controller_client.html">
|
| <link rel="import"
|
| @@ -39,8 +39,7 @@ x-profiling-view > tr-ui-timeline-view {
|
| -webkit-user-select: text;
|
| }
|
|
|
| -x-timeline-view-buttons,
|
| -x-timeline-view-buttons > #monitoring-elements {
|
| +x-timeline-view-buttons {
|
| display: flex;
|
| align-items: center;
|
| }
|
| @@ -50,11 +49,6 @@ x-timeline-view-buttons > #monitoring-elements {
|
| <tr-ui-b-info-bar-group></tr-ui-b-info-bar-group>
|
| <x-timeline-view-buttons>
|
| <button id="record-button">Record</button>
|
| - <span id="monitoring-elements">
|
| - <input id="monitor-checkbox" type="checkbox">
|
| - <label for="monitor-checkbox">Monitoring</label></input>
|
| - <button id="capture-button">Capture Monitoring Snapshot</button>
|
| - </span>
|
| <button id="save-button">Save</button>
|
| <button id="load-button">Load</button>
|
| </x-timeline-view-buttons>
|
| @@ -80,7 +74,7 @@ tr.exportTo('tr.ui.e.about_tracing', function() {
|
| };
|
| reader.onerror = function(err) {
|
| reject(err);
|
| - }
|
| + };
|
|
|
| var is_binary = /[.]gz$/.test(filename) || /[.]zip$/.test(filename);
|
| if (is_binary)
|
| @@ -111,9 +105,6 @@ tr.exportTo('tr.ui.e.about_tracing', function() {
|
| // Detach the buttons. We will reattach them to the timeline view.
|
| // TODO(nduca): Make timeline-view have a content select="x-buttons"
|
| // that pulls in any buttons.
|
| - this.monitoringElements_ = this.querySelector('#monitoring-elements');
|
| - this.monitorCheckbox_ = this.querySelector('#monitor-checkbox');
|
| - this.captureButton_ = this.querySelector('#capture-button');
|
| this.recordButton_ = this.querySelector('#record-button');
|
| this.loadButton_ = this.querySelector('#load-button');
|
| this.saveButton_ = this.querySelector('#save-button');
|
| @@ -146,14 +137,8 @@ tr.exportTo('tr.ui.e.about_tracing', function() {
|
| }
|
|
|
| this.isRecording_ = false;
|
| - this.isMonitoring_ = false;
|
| this.activeTrace_ = undefined;
|
|
|
| - window.onMonitoringStateChanged = function(is_monitoring) {
|
| - this.onMonitoringStateChanged_(is_monitoring);
|
| - }.bind(this);
|
| -
|
| - this.getMonitoringStatus();
|
| this.updateTracingControllerSpecificState_();
|
| },
|
|
|
| @@ -167,10 +152,6 @@ tr.exportTo('tr.ui.e.about_tracing', function() {
|
| return this.isRecording_;
|
| },
|
|
|
| - get isMonitoring() {
|
| - return this.isMonitoring_;
|
| - },
|
| -
|
| set tracingControllerClient(tracingControllerClient) {
|
| this.tracingControllerClient_ = tracingControllerClient;
|
| this.updateTracingControllerSpecificState_();
|
| @@ -185,31 +166,23 @@ tr.exportTo('tr.ui.e.about_tracing', function() {
|
| 'This about:tracing is connected to a remote device...',
|
| [{buttonText: 'Wow!', onClick: function() {}}]);
|
| }
|
| -
|
| - this.monitoringElements_.style.display = isInspector ? 'none' : '';
|
| },
|
|
|
| beginRecording: function() {
|
| if (this.isRecording_)
|
| throw new Error('Already recording');
|
| - if (this.isMonitoring_)
|
| - throw new Error('Already monitoring');
|
| this.isRecording_ = true;
|
| - this.monitorCheckbox_.disabled = true;
|
| - this.monitorCheckbox_.checked = false;
|
| var resultPromise = tr.ui.e.about_tracing.beginRecording(
|
| this.tracingControllerClient_);
|
| resultPromise.then(
|
| function(data) {
|
| this.isRecording_ = false;
|
| - this.monitorCheckbox_.disabled = false;
|
| var traceName = tr.ui.e.about_tracing.defaultTraceName(
|
| this.tracingControllerClient_);
|
| this.setActiveTrace(traceName, data, false);
|
| }.bind(this),
|
| function(err) {
|
| this.isRecording_ = false;
|
| - this.monitorCheckbox_.disabled = false;
|
| if (err instanceof tr.ui.e.about_tracing.UserCancelledError)
|
| return;
|
| tr.ui.b.Overlay.showError('Error while recording', err);
|
| @@ -217,86 +190,6 @@ tr.exportTo('tr.ui.e.about_tracing', function() {
|
| return resultPromise;
|
| },
|
|
|
| - beginMonitoring: function() {
|
| - if (this.isRecording_)
|
| - throw new Error('Already recording');
|
| - if (this.isMonitoring_)
|
| - throw new Error('Already monitoring');
|
| - var resultPromise =
|
| - tr.ui.e.about_tracing.beginMonitoring(this.tracingControllerClient_);
|
| - resultPromise.then(
|
| - function() {
|
| - }.bind(this),
|
| - function(err) {
|
| - if (err instanceof tr.ui.e.about_tracing.UserCancelledError)
|
| - return;
|
| - tr.ui.b.Overlay.showError('Error while monitoring', err);
|
| - }.bind(this));
|
| - return resultPromise;
|
| - },
|
| -
|
| - endMonitoring: function() {
|
| - if (this.isRecording_)
|
| - throw new Error('Already recording');
|
| - if (!this.isMonitoring_)
|
| - throw new Error('Monitoring is disabled');
|
| - var resultPromise =
|
| - tr.ui.e.about_tracing.endMonitoring(this.tracingControllerClient_);
|
| - resultPromise.then(
|
| - function() {
|
| - }.bind(this),
|
| - function(err) {
|
| - if (err instanceof tr.ui.e.about_tracing.UserCancelledError)
|
| - return;
|
| - tr.ui.b.Overlay.showError('Error while monitoring', err);
|
| - }.bind(this));
|
| - return resultPromise;
|
| - },
|
| -
|
| - captureMonitoring: function() {
|
| - if (!this.isMonitoring_)
|
| - throw new Error('Monitoring is disabled');
|
| - var resultPromise =
|
| - tr.ui.e.about_tracing.captureMonitoring(
|
| - this.tracingControllerClient_);
|
| - resultPromise.then(
|
| - function(data) {
|
| - var traceName = tr.ui.e.about_tracing.defaultTraceName(
|
| - this.tracingControllerClient_);
|
| - this.setActiveTrace(traceName, data, true);
|
| - }.bind(this),
|
| - function(err) {
|
| - if (err instanceof tr.ui.e.about_tracing.UserCancelledError)
|
| - return;
|
| - tr.ui.b.Overlay.showError('Error while monitoring', err);
|
| - }.bind(this));
|
| - return resultPromise;
|
| - },
|
| -
|
| - getMonitoringStatus: function() {
|
| - var resultPromise =
|
| - tr.ui.e.about_tracing.getMonitoringStatus(
|
| - this.tracingControllerClient_);
|
| - resultPromise.then(
|
| - function(status) {
|
| - this.onMonitoringStateChanged_(status.isMonitoring);
|
| - }.bind(this),
|
| - function(err) {
|
| - if (err instanceof tr.ui.e.about_tracing.UserCancelledError)
|
| - return;
|
| - tr.ui.b.Overlay.showError('Error while updating tracing states',
|
| - err);
|
| - }.bind(this));
|
| - return resultPromise;
|
| - },
|
| -
|
| - onMonitoringStateChanged_: function(is_monitoring) {
|
| - this.isMonitoring_ = is_monitoring;
|
| - this.recordButton_.disabled = is_monitoring;
|
| - this.captureButton_.disabled = !is_monitoring;
|
| - this.monitorCheckbox_.checked = is_monitoring;
|
| - },
|
| -
|
| get timelineView() {
|
| return this.timelineView_;
|
| },
|
| @@ -341,22 +234,6 @@ tr.exportTo('tr.ui.e.about_tracing', function() {
|
| this.beginRecording();
|
| }.bind(this));
|
|
|
| - this.monitorCheckbox_.addEventListener(
|
| - 'click', function(event) {
|
| - event.stopPropagation();
|
| - if (this.isMonitoring_)
|
| - this.endMonitoring();
|
| - else
|
| - this.beginMonitoring();
|
| - }.bind(this));
|
| -
|
| - this.captureButton_.addEventListener(
|
| - 'click', function(event) {
|
| - event.stopPropagation();
|
| - this.captureMonitoring();
|
| - }.bind(this));
|
| - this.captureButton_.disabled = true;
|
| -
|
| this.loadButton_.addEventListener(
|
| 'click', function(event) {
|
| event.stopPropagation();
|
|
|