<!DOCTYPE html>
<!--
Copyright (c) 2016 The Chromium Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-->

<link rel="import" href="/tracing/model/event_container.html">

<script>
'use strict';

tr.exportTo('tr.model.um', function() {
  class UserModel extends tr.model.EventContainer {
    constructor(parentModel) {
      super();
      this.parentModel_ = parentModel;
      this.expectations_ = new tr.model.EventSet();
    }

    get stableId() {
      return 'UserModel';
    }

    get parentModel() {
      return this.parentModel_;
    }

    sortExpectations() {
      this.expectations_.sortEvents((x, y) => (x.start - y.start));
    }

    get expectations() {
      return this.expectations_;
    }

    shiftTimestampsForward(amount) {
    }

    addCategoriesToDict(categoriesDict) {
    }

    * childEvents() {
      yield* this.expectations;
    }

    * childEventContainers() {
    }

    updateBounds() {
      this.bounds.reset();
      this.expectations.forEach(function(expectation) {
        expectation.addBoundsToRange(this.bounds);
      }, this);
    }
  }

  return {
    UserModel,
  };
});
</script>

<!DOCTYPE html>
<!--
Copyright (c) 2016 The Chromium Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-->

<link rel="import" href="/tracing/model/event_container.html">

<script>
'use strict';

tr.exportTo('tr.model.um', function() {
  class UserModel extends tr.model.EventContainer {
    constructor(parentModel) {
      super();
      this.parentModel_ = parentModel;
      this.expectations_ = new tr.model.EventSet();
    }

    get stableId() {
      return 'UserModel';
    }

    get parentModel() {
      return this.parentModel_;
    }

    sortExpectations() {
      this.expectations_.sortEvents((x, y) => (x.start - y.start));
    }

    get expectations() {
      return this.expectations_;
    }

    shiftTimestampsForward(amount) {
    }

    addCategoriesToDict(categoriesDict) {
    }

    * childEvents() {
      yield* this.expectations;
    }

    * childEventContainers() {
    }

    updateBounds() {
      this.bounds.reset();
      for (var expectation of this.expectations) {
        expectation.addBoundsToRange(this.bounds);
      }
    }
  }

  return {
    UserModel,
  };
});
</script>

Update the style of a loop in UserModel.
Update the style of a loop in UserModel.

Review-Url: https://codereview.chromium.org/2634643002
