OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <!-- | 2 <!-- |
3 Copyright (c) 2013 The Chromium Authors. All rights reserved. | 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 | 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="stylesheet" href="/tracing/ui/extras/chrome/cc/layer_picker.css"> | |
9 | |
10 <link rel="import" href="/tracing/base/unit.html"> | 8 <link rel="import" href="/tracing/base/unit.html"> |
11 <link rel="import" href="/tracing/extras/chrome/cc/constants.html"> | 9 <link rel="import" href="/tracing/extras/chrome/cc/constants.html"> |
12 <link rel="import" href="/tracing/extras/chrome/cc/layer_tree_host_impl.html"> | 10 <link rel="import" href="/tracing/extras/chrome/cc/layer_tree_host_impl.html"> |
13 <link rel="import" href="/tracing/extras/chrome/cc/util.html"> | 11 <link rel="import" href="/tracing/extras/chrome/cc/util.html"> |
14 <link rel="import" href="/tracing/model/event.html"> | 12 <link rel="import" href="/tracing/model/event.html"> |
15 <link rel="import" href="/tracing/ui/analysis/generic_object_view.html"> | 13 <link rel="import" href="/tracing/ui/analysis/generic_object_view.html"> |
16 <link rel="import" href="/tracing/ui/base/dom_helpers.html"> | 14 <link rel="import" href="/tracing/ui/base/dom_helpers.html"> |
17 <link rel="import" href="/tracing/ui/base/drag_handle.html"> | 15 <link rel="import" href="/tracing/ui/base/drag_handle.html"> |
18 <link rel="import" href="/tracing/ui/base/list_view.html"> | 16 <link rel="import" href="/tracing/ui/base/list_view.html"> |
19 <link rel="import" href="/tracing/ui/extras/chrome/cc/selection.html"> | 17 <link rel="import" href="/tracing/ui/extras/chrome/cc/selection.html"> |
(...skipping 12 matching lines...) Expand all Loading... |
32 const LayerPicker = tr.ui.b.define('tr-ui-e-chrome-cc-layer-picker'); | 30 const LayerPicker = tr.ui.b.define('tr-ui-e-chrome-cc-layer-picker'); |
33 | 31 |
34 LayerPicker.prototype = { | 32 LayerPicker.prototype = { |
35 __proto__: HTMLUnknownElement.prototype, | 33 __proto__: HTMLUnknownElement.prototype, |
36 | 34 |
37 decorate() { | 35 decorate() { |
38 this.lthi_ = undefined; | 36 this.lthi_ = undefined; |
39 this.controls_ = document.createElement('top-controls'); | 37 this.controls_ = document.createElement('top-controls'); |
40 this.renderPassQuads_ = false; | 38 this.renderPassQuads_ = false; |
41 | 39 |
| 40 this.style.display = 'flex'; |
| 41 this.style.flexDirection = 'column'; |
| 42 this.controls_.style.flexGrow = 0; |
| 43 this.controls_.style.flexShrink = 0; |
| 44 this.controls_.style.flexBasis = 'auto'; |
| 45 this.controls_.style.backgroundImage = |
| 46 '-webkit-gradient(linear, 0 0, 100% 0, from(#E5E5E5), to(#D1D1D1))'; |
| 47 this.controls_.style.borderBottom = '1px solid #8e8e8e'; |
| 48 this.controls_.style.borderTop = '1px solid white'; |
| 49 this.controls_.style.display = 'inline'; |
| 50 this.controls_.style.fontSize = '14px'; |
| 51 this.controls_.style.paddingLeft = '2px'; |
42 | 52 |
43 this.itemList_ = new tr.ui.b.ListView(); | 53 this.itemList_ = new tr.ui.b.ListView(); |
| 54 this.itemList_.style.flexGrow = 1; |
| 55 this.itemList_.style.flexShrink = 1; |
| 56 this.itemList_.style.flexBasis = 'auto'; |
| 57 this.itemList_.style.fontFamily = 'monospace'; |
| 58 this.itemList_.style.overflow = 'auto'; |
44 Polymer.dom(this).appendChild(this.controls_); | 59 Polymer.dom(this).appendChild(this.controls_); |
45 | 60 |
46 Polymer.dom(this).appendChild(this.itemList_); | 61 Polymer.dom(this).appendChild(this.itemList_); |
47 | 62 |
48 this.itemList_.addEventListener( | 63 this.itemList_.addEventListener( |
49 'selection-changed', this.onItemSelectionChanged_.bind(this)); | 64 'selection-changed', this.onItemSelectionChanged_.bind(this)); |
50 | 65 |
51 Polymer.dom(this.controls_).appendChild(tr.ui.b.createSelector( | 66 Polymer.dom(this.controls_).appendChild(tr.ui.b.createSelector( |
52 this, 'whichTree', | 67 this, 'whichTree', |
53 'layerPicker.whichTree', constants.ACTIVE_TREE, | 68 'layerPicker.whichTree', constants.ACTIVE_TREE, |
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
323 this.selection_ = selection; | 338 this.selection_ = selection; |
324 this.updateContents_(); | 339 this.updateContents_(); |
325 } | 340 } |
326 }; | 341 }; |
327 | 342 |
328 return { | 343 return { |
329 LayerPicker, | 344 LayerPicker, |
330 }; | 345 }; |
331 }); | 346 }); |
332 </script> | 347 </script> |
OLD | NEW |