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

Unified Diff: tracing/tracing/model/model.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tracing/tracing/model/memory_dump_test_utils.html ('k') | tracing/tracing/model/model_test.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tracing/tracing/model/model.html
diff --git a/tracing/tracing/model/model.html b/tracing/tracing/model/model.html
index 612ee3897c76305926862f88359229d0e2822c10..b1164f7ebf79dfa3e670ddd04f3b4ed1c8ad5617 100644
--- a/tracing/tracing/model/model.html
+++ b/tracing/tracing/model/model.html
@@ -31,6 +31,7 @@ found in the LICENSE file.
<link rel="import" href="/tracing/model/stack_frame.html">
<link rel="import" href="/tracing/model/user_model/user_expectation.html">
<link rel="import" href="/tracing/model/user_model/user_model.html">
+<link rel="import" href="/tracing/ui/base/overlay.html">
<link rel="import" href="/tracing/value/time_display_mode.html">
<link rel="import" href="/tracing/value/unit.html">
@@ -118,9 +119,9 @@ tr.exportTo('tr', function() {
getEventByStableId: function(stableId) {
if (this.eventsByStableId_ === undefined) {
this.eventsByStableId_ = {};
- this.iterateAllEvents(function(event) {
+ for (var event of this.getDescendantEvents()) {
this.eventsByStableId_[event.stableId] = event;
- }, this);
+ }
}
return this.eventsByStableId_[stableId];
},
@@ -145,25 +146,12 @@ tr.exportTo('tr', function() {
return this.helpersByConstructorGUID_[constructor.guid];
},
- findTopmostSlicesInThisContainer: function(eventPredicate, callback,
- opt_this) {
- },
-
- childEvents: function*(eventTypePredicate, opt_this) {
- if (eventTypePredicate.call(opt_this, GlobalMemoryDump))
- yield * this.globalMemoryDumps;
-
- if (eventTypePredicate.call(opt_this, GlobalInstantEvent))
- yield * this.instantEvents;
-
- if (eventTypePredicate.call(opt_this, FlowEvent))
- yield * this.flowEvents;
-
- if (eventTypePredicate.call(opt_this, Alert))
- yield * this.alerts;
-
- if (eventTypePredicate.call(opt_this, Sample))
- yield * this.samples;
+ childEvents: function*() {
+ yield * this.globalMemoryDumps;
+ yield * this.instantEvents;
+ yield * this.flowEvents;
+ yield * this.alerts;
+ yield * this.samples;
},
childEventContainers: function*() {
@@ -187,29 +175,22 @@ tr.exportTo('tr', function() {
updateBounds: function() {
this.bounds.reset();
var bounds = this.bounds;
-
- this.iterateAllChildEventContainers(function(ec) {
+ for (var ec of this.childEventContainers()) {
ec.updateBounds();
bounds.addRange(ec.bounds);
- });
- this.iterateAllEventsInThisContainer(
- function(eventConstructor) { return true; },
- function(event) {
- event.addBoundsToRange(bounds);
- });
+ }
+ for (var event of this.childEvents())
+ event.addBoundsToRange(bounds);
},
shiftWorldToZero: function() {
var shiftAmount = -this.bounds.min;
this.timestampShiftToZeroAmount_ = shiftAmount;
- this.iterateAllChildEventContainers(function(ec) {
+ for (var ec of this.childEventContainers())
ec.shiftTimestampsForward(shiftAmount);
- });
- this.iterateAllEventsInThisContainer(
- function(eventConstructor) { return true; },
- function(event) {
- event.start += shiftAmount;
- });
+
+ for (var event of this.childEvents())
+ event.start += shiftAmount;
this.updateBounds();
},
« no previous file with comments | « tracing/tracing/model/memory_dump_test_utils.html ('k') | tracing/tracing/model/model_test.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698