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

Side by Side Diff: tracing/tracing/ui/analysis/single_power_sample_sub_view.html

Issue 2246173002: Move AnalysisSubView to tr.ui.analysis namespace (Closed) Base URL: https://chromium.googlesource.com/external/github.com/catapult-project/catapult.git@master
Patch Set: Created 4 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 unified diff | Download patch
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <!-- 2 <!--
3 Copyright 2015 The Chromium Authors. All rights reserved. 3 Copyright 2015 The Chromium Authors. All rights reserved.
4 Use of this source code is governed by a BSD-style license that can be 4 Use of this source code is governed by a BSD-style license that can be
5 found in the LICENSE file. 5 found in the LICENSE file.
6 --> 6 -->
7 7
8 <link rel="import" href="/tracing/model/event_set.html"> 8 <link rel="import" href="/tracing/model/event_set.html">
9 <link rel="import" href="/tracing/ui/analysis/analysis_sub_view.html"> 9 <link rel="import" href="/tracing/ui/analysis/analysis_sub_view.html">
10 <link rel="import" href="/tracing/ui/base/table.html"> 10 <link rel="import" href="/tracing/ui/base/table.html">
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 </style> 78 </style>
79 <tr-ui-a-power-sample-table id="samplesTable"> 79 <tr-ui-a-power-sample-table id="samplesTable">
80 </tr-ui-a-power-sample-table> 80 </tr-ui-a-power-sample-table>
81 </template> 81 </template>
82 </dom-module> 82 </dom-module>
83 <script> 83 <script>
84 'use strict'; 84 'use strict';
85 85
86 Polymer({ 86 Polymer({
87 is: 'tr-ui-a-single-power-sample-sub-view', 87 is: 'tr-ui-a-single-power-sample-sub-view',
88 behaviors: [tr.ui.analysis.behaviors.AnalysisSubView], 88 behaviors: [tr.ui.analysis.AnalysisSubView],
89 89
90 ready: function() { 90 ready: function() {
91 this.currentSelection_ = undefined; 91 this.currentSelection_ = undefined;
92 }, 92 },
93 93
94 get selection() { 94 get selection() {
95 return this.currentSelection_; 95 return this.currentSelection_;
96 }, 96 },
97 97
98 set selection(selection) { 98 set selection(selection) {
99 this.currentSelection_ = selection; 99 this.currentSelection_ = selection;
100 this.updateContents_(); 100 this.updateContents_();
101 }, 101 },
102 102
103 updateContents_: function() { 103 updateContents_: function() {
104 if (this.selection.length != 1) 104 if (this.selection.length != 1)
105 throw 'Cannot pass multiple samples to sample table.'; 105 throw 'Cannot pass multiple samples to sample table.';
106 this.$.samplesTable.sample = tr.b.getOnlyElement(this.selection); 106 this.$.samplesTable.sample = tr.b.getOnlyElement(this.selection);
107 } 107 }
108 }); 108 });
109 </script> 109 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698