1<!DOCTYPE html>
2<!--
3Copyright (c) 2016 The Chromium Authors. All rights reserved.
4Use of this source code is governed by a BSD-style license that can be
5found in the LICENSE file.
6-->
7
8<link rel="import" href="/tracing/model/event_registry.html">
9<link rel="import" href="/tracing/model/object_instance.html">
10
11<script>
12'use strict';
13
14tr.exportTo('tr.e.chrome', function() {
15  var ObjectSnapshot = tr.model.ObjectSnapshot;
16  var ObjectInstance = tr.model.ObjectInstance;
17
18  function LayoutTreeInstance() {
19    ObjectInstance.apply(this, arguments);
20  }
21
22  LayoutTreeInstance.prototype = {
23    __proto__: ObjectInstance.prototype,
24  };
25
26  ObjectInstance.register(LayoutTreeInstance, {typeName: 'LayoutTree'});
27
28  function LayoutTreeSnapshot() {
29    ObjectSnapshot.apply(this, arguments);
30    this.rootLayoutObject = new tr.e.chrome.LayoutObject(this, this.args);
31  }
32
33  LayoutTreeSnapshot.prototype = {
34    __proto__: ObjectSnapshot.prototype,
35  };
36
37  ObjectSnapshot.register(LayoutTreeSnapshot, {typeName: 'LayoutTree'});
38
39  tr.model.EventRegistry.register(
40      LayoutTreeSnapshot,
41      {
42        name: 'layoutTree',
43        pluralName: 'layoutTrees',
44        singleViewElementName: 'tr-ui-a-layout-tree-sub-view',
45        multiViewElementName: 'tr-ui-a-layout-tree-sub-view'
46      });
47
48  return {
49    LayoutTreeInstance: LayoutTreeInstance,
50    LayoutTreeSnapshot: LayoutTreeSnapshot
51  };
52});
53</script>
54
55