1<!DOCTYPE html>
2<!--
3Copyright (c) 2013 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/base/extension_registry.html">
9<link rel="import" href="/tracing/ui/base/ui.html">
10
11<script>
12'use strict';
13
14tr.exportTo('tr.ui.analysis', function() {
15  var ObjectSnapshotView = tr.ui.b.define('object-snapshot-view');
16
17  ObjectSnapshotView.prototype = {
18    __proto__: HTMLUnknownElement.prototype,
19
20    decorate: function() {
21      this.objectSnapshot_ = undefined;
22    },
23
24    get requiresTallView() {
25      return true;
26    },
27
28    set modelEvent(obj) {
29      this.objectSnapshot = obj;
30    },
31
32    get modelEvent() {
33      return this.objectSnapshot;
34    },
35
36    get objectSnapshot() {
37      return this.objectSnapshot_;
38    },
39
40    set objectSnapshot(i) {
41      this.objectSnapshot_ = i;
42      this.updateContents();
43    },
44
45    updateContents: function() {
46      throw new Error('Not implemented');
47    }
48  };
49
50  var options = new tr.b.ExtensionRegistryOptions(
51      tr.b.TYPE_BASED_REGISTRY_MODE);
52  options.mandatoryBaseClass = ObjectSnapshotView;
53  options.defaultMetadata = {
54    showInstances: true,
55    showInTrackView: true
56  };
57  tr.b.decorateExtensionRegistry(ObjectSnapshotView, options);
58
59  return {
60    ObjectSnapshotView: ObjectSnapshotView
61  };
62});
63</script>
64