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

Side by Side Diff: tools/deep_memory_profiler/visualizer/static/menu-view.js

Issue 1150173003: Fix some JS style nits. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge Created 5 years, 7 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * This is a view class showing tree-menu. 6 * This is a view class showing tree-menu.
7 * @param {Object} profiler Must have addListener method. 7 * @param {Object} profiler Must have addListener method.
8 * @construct 8 * @construct
9 */ 9 */
10 var MenuView = function(profiler) { 10 var MenuView = function(profiler) {
(...skipping 18 matching lines...) Expand all
29 $tree.tree('selectNode', null); 29 $tree.tree('selectNode', null);
30 return; 30 return;
31 } 31 }
32 32
33 var node = $tree.tree('getNodeById', id); 33 var node = $tree.tree('getNodeById', id);
34 $tree.tree('selectNode', node); 34 $tree.tree('selectNode', node);
35 }; 35 };
36 36
37 /** 37 /**
38 * Update menu view when model updated. 38 * Update menu view when model updated.
39 * @param {Array.<Object>} models 39 * @param {Array<Object>} models
40 * @private 40 * @private
41 */ 41 */
42 MenuView.prototype.redraw_ = function(models) { 42 MenuView.prototype.redraw_ = function(models) {
43 function convert(origin, target) { 43 function convert(origin, target) {
44 target.label = origin.name; 44 target.label = origin.name;
45 target.id = origin.id; 45 target.id = origin.id;
46 46
47 if ('children' in origin) { 47 if ('children' in origin) {
48 target.children = []; 48 target.children = [];
49 origin.children.forEach(function(originChild) { 49 origin.children.forEach(function(originChild) {
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 }); 107 });
108 this.$tree_.bind('tree.close', function(event) { 108 this.$tree_.bind('tree.close', function(event) {
109 event.preventDefault(); 109 event.preventDefault();
110 self.profiler_.unsetSub(event.node.id); 110 self.profiler_.unsetSub(event.node.id);
111 self.profiler_.setSelected(event.node.id); 111 self.profiler_.setSelected(event.node.id);
112 }); 112 });
113 } else { 113 } else {
114 this.$tree_.tree('loadData', data); 114 this.$tree_.tree('loadData', data);
115 } 115 }
116 }; 116 };
OLDNEW
« no previous file with comments | « tools/deep_memory_profiler/visualizer/static/graph-view.js ('k') | tools/deep_memory_profiler/visualizer/static/profiler.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698