OLD | NEW |
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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 | 95 |
96 // Delegate click event to profiler. | 96 // Delegate click event to profiler. |
97 this.$tree_.bind('tree.click', function(event) { | 97 this.$tree_.bind('tree.click', function(event) { |
98 event.preventDefault(); | 98 event.preventDefault(); |
99 self.profiler_.setSelected(event.node.id); | 99 self.profiler_.setSelected(event.node.id); |
100 }); | 100 }); |
101 } else { | 101 } else { |
102 this.$tree_.tree('loadData', data); | 102 this.$tree_.tree('loadData', data); |
103 } | 103 } |
104 }; | 104 }; |
OLD | NEW |