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

Side by Side Diff: tracing/tracing/extras/tquery/tquery.html

Issue 2162963002: [polymer] Merge of master into polymer10-migration (Closed) Base URL: git@github.com:catapult-project/catapult.git@polymer10-migration
Patch Set: Merge polymer10-migration int polymer10-merge Created 4 years, 5 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/base/task.html"> 8 <link rel="import" href="/tracing/base/task.html">
9 <link rel="import" href="/tracing/core/filter.html"> 9 <link rel="import" href="/tracing/core/filter.html">
10 <link rel="import" href="/tracing/core/scripting_object.html"> 10 <link rel="import" href="/tracing/core/scripting_object.html">
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 context.event = event.subSlices[i]; 140 context.event = event.subSlices[i];
141 this.evaluateFilterExpressionForEvent_( 141 this.evaluateFilterExpressionForEvent_(
142 context, inputSelection, outputSelection, seenEvents); 142 context, inputSelection, outputSelection, seenEvents);
143 } 143 }
144 }, 144 },
145 145
146 // Returns a task that fills the given selection with everything in the 146 // Returns a task that fills the given selection with everything in the
147 // model. 147 // model.
148 selectEverythingAsTask_: function(selection) { 148 selectEverythingAsTask_: function(selection) {
149 var filterTask = new tr.b.Task(); 149 var filterTask = new tr.b.Task();
150 this.model_.iterateAllEventContainers(function(container) { 150 for (var container of this.model_.getDescendantEventContainers()) {
151 filterTask.subTask(function() { 151 filterTask.subTask(() => {
152 container.iterateAllEventsInThisContainer( 152 for (var event of container.childEvents())
153 function() { return true; }, 153 addEventTreeToSelection(selection, event);
154 addEventTreeToSelection.bind(undefined, selection));
155 }, this); 154 }, this);
156 }, this); 155 }
157 return filterTask; 156 return filterTask;
158 }, 157 },
159 158
160 // Returns a promise which will resolve into a {EventSet} representing the 159 // Returns a promise which will resolve into a {EventSet} representing the
161 // result of this query. 160 // result of this query.
162 ready: function() { 161 ready: function() {
163 return new Promise(function(resolve, reject) { 162 return new Promise(function(resolve, reject) {
164 var graph = this.createFilterTaskGraph_(); 163 var graph = this.createFilterTaskGraph_();
165 graph.lastTask = graph.lastTask.after(function() { 164 graph.lastTask = graph.lastTask.after(function() {
166 resolve(this.selection_); 165 resolve(this.selection_);
(...skipping 15 matching lines...) Expand all
182 { 181 {
183 name: '$t' 182 name: '$t'
184 } 183 }
185 ); 184 );
186 185
187 return { 186 return {
188 TQuery: TQuery 187 TQuery: TQuery
189 }; 188 };
190 }); 189 });
191 </script> 190 </script>
OLDNEW
« no previous file with comments | « tracing/tracing/extras/importer/linux_perf/ftrace_importer.html ('k') | tracing/tracing/extras/vsync/vsync_auditor.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698