3 Copyright (c) 2013 The Chromium Authors. All rights reserved.
4 Use of this source code is governed by a BSD-style license that can be
5 found in the LICENSE file.
8 <link rel="import" href="/base/ui.html">
13 tv.exportTo('tracing.analysis', function() {
14 var ObjectInstanceView = tv.ui.define('object-instance-view');
16 ObjectInstanceView.prototype = {
17 __proto__: HTMLDivElement.prototype,
19 decorate: function() {
20 this.objectInstance_ = undefined;
23 get requiresTallView() {
28 this.objectInstance = obj;
32 return this.objectInstance;
35 get objectInstance() {
36 return this.objectInstance_;
39 set objectInstance(i) {
40 this.objectInstance_ = i;
41 this.updateContents();
44 updateContents: function() {
45 throw new Error('Not implemented');
49 ObjectInstanceView.typeNameToViewInfoMap = {};
50 ObjectInstanceView.register = function(typeName,
53 if (ObjectInstanceView.typeNameToViewInfoMap[typeName])
54 throw new Error('Handler already registered for ' + typeName);
55 var options = opt_options || {
58 ObjectInstanceView.typeNameToViewInfoMap[typeName] = {
59 constructor: viewConstructor,
64 ObjectInstanceView.unregister = function(typeName) {
65 if (ObjectInstanceView.typeNameToViewInfoMap[typeName] === undefined)
66 throw new Error(typeName + ' not registered');
67 delete ObjectInstanceView.typeNameToViewInfoMap[typeName];
70 ObjectInstanceView.getViewInfo = function(typeName) {
71 return ObjectInstanceView.typeNameToViewInfoMap[typeName];
76 ObjectInstanceView: ObjectInstanceView