| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <!-- | 2 <!-- |
| 3 Copyright 2016 The Chromium Authors. All rights reserved. | 3 Copyright 2016 The Chromium Authors. All rights reserved. |
| 4 Use of this source code is governed by a BSD-style license that can be | 4 Use of this source code is governed by a BSD-style license that can be |
| 5 found in the LICENSE file. | 5 found in the LICENSE file. |
| 6 --> | 6 --> |
| 7 | 7 |
| 8 <link rel="import" href="/tracing/ui/base/tab_view.html"> | 8 <link rel="import" href="/tracing/ui/base/tab_view.html"> |
| 9 <link rel="import" href="/tracing/ui/brushing_state_controller.html"> | 9 <link rel="import" href="/tracing/ui/brushing_state_controller.html"> |
| 10 | 10 |
| (...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 223 view.values = values; | 223 view.values = values; |
| 224 | 224 |
| 225 this.$.tabView.addSubView(view); | 225 this.$.tabView.addSubView(view); |
| 226 | 226 |
| 227 if (elementName.toLowerCase() === initialTabElementName) | 227 if (elementName.toLowerCase() === initialTabElementName) |
| 228 this.$.tabView.selectedSubView = view; | 228 this.$.tabView.selectedSubView = view; |
| 229 }, this); | 229 }, this); |
| 230 | 230 |
| 231 // TODO(charliea): If TabView were structured correctly, this could almost | 231 // TODO(charliea): If TabView were structured correctly, this could almost |
| 232 // certainly be done with attribute binding in the HTML template. | 232 // certainly be done with attribute binding in the HTML template. |
| 233 this.$.tabView.set('tabsHidden', this$.tabView.tabs.length === 1); | 233 this.$.tabView.set('tabsHidden', this.$.tabView.tabs.length === 1); |
| 234 } | 234 } |
| 235 }); | 235 }); |
| 236 | 236 |
| 237 /** | 237 /** |
| 238 * Register the name of a polymer element that supports displaying ValueSets. | 238 * Register the name of a polymer element that supports displaying ValueSets. |
| 239 * | 239 * |
| 240 * @param {string} elementName | 240 * @param {string} elementName |
| 241 */ | 241 */ |
| 242 function registerValueSetView(elementName) { | 242 function registerValueSetView(elementName) { |
| 243 if (tr.ui.b.isUnknownElementName(elementName)) | 243 if (tr.ui.b.isUnknownElementName(elementName)) |
| 244 throw new Error('Element not registered: ' + elementName); | 244 throw new Error('Element not registered: ' + elementName); |
| 245 | 245 |
| 246 VALUE_SET_VIEW_ELEMENT_NAMES.push(elementName); | 246 VALUE_SET_VIEW_ELEMENT_NAMES.push(elementName); |
| 247 } | 247 } |
| 248 | 248 |
| 249 return { | 249 return { |
| 250 registerValueSetView: registerValueSetView, | 250 registerValueSetView: registerValueSetView, |
| 251 SELECTED_TAB_SETTINGS_KEY: SELECTED_TAB_SETTINGS_KEY | 251 SELECTED_TAB_SETTINGS_KEY: SELECTED_TAB_SETTINGS_KEY |
| 252 }; | 252 }; |
| 253 }); | 253 }); |
| 254 </script> | 254 </script> |
| OLD | NEW |