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

Side by Side Diff: tools/cc-frame-viewer/src/analysis_view.js

Issue 15736032: Remove old cc-frame-viewer now that it is upstreamed into trace_viewer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 /* Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 * Use of this source code is governed by a BSD-style license that can be
3 * found in the LICENSE file.
4 */
5 'use strict';
6
7 base.require('tile_view');
8 base.require('ui');
9 base.require('ui.list_and_associated_view');
10
11 base.requireStylesheet('analysis_view');
12
13 base.exportTo('ccfv', function() {
14 var TileView = ccfv.TileView;
15
16 var AnalysisView = ui.define('x-analysis-view');
17
18 AnalysisView.prototype = {
19 __proto__: HTMLUnknownElement.prototype,
20
21 decorate: function() {
22 this.selection_ = undefined;
23 this.updateChildren_();
24 },
25
26 set selection(selection) {
27 if (this.selection_)
28 this.selection_.deactivate();
29 this.selection_ = selection;
30 if (this.selection_)
31 this.selection_.activate();
32 this.updateChildren_();
33 },
34
35 get selection() {
36 return this.selection_;
37 },
38
39 updateChildren_: function() {
40 if (!this.selection_) {
41 this.textContent = 'Select something';
42 return;
43 }
44 if (this.selection_.tiles) {
45 this.updateChildrenGivenTiles_(this.selection_.tiles);
46 return;
47 }
48 throw new Error('I am confused about what you selected');
49 },
50
51 updateChildrenGivenTiles_: function(tiles) {
52 this.textContent = '';
53 var tileListEl = new ui.ListAndAssociatedView();
54 tileListEl.view = new TileView();
55 tileListEl.viewProperty = 'tile';
56 tileListEl.list = tiles;
57 tileListEl.listProperty = 'title';
58 this.appendChild(tileListEl);
59 },
60 };
61
62 return {
63 AnalysisView: AnalysisView
64 }
65 });
66
OLDNEW
« no previous file with comments | « tools/cc-frame-viewer/src/analysis_view.css ('k') | tools/cc-frame-viewer/src/analysis_view_test.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698