OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #ifndef CHROME_BROWSER_ANDROID_COMPOSITOR_LAYER_OVERLAY_PANEL_LAYER_H_ | 5 #ifndef CHROME_BROWSER_ANDROID_COMPOSITOR_LAYER_OVERLAY_PANEL_LAYER_H_ |
6 #define CHROME_BROWSER_ANDROID_COMPOSITOR_LAYER_OVERLAY_PANEL_LAYER_H_ | 6 #define CHROME_BROWSER_ANDROID_COMPOSITOR_LAYER_OVERLAY_PANEL_LAYER_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "chrome/browser/android/compositor/layer/layer.h" | 10 #include "chrome/browser/android/compositor/layer/layer.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 } | 21 } |
22 | 22 |
23 namespace android { | 23 namespace android { |
24 | 24 |
25 class OverlayPanelLayer : public Layer { | 25 class OverlayPanelLayer : public Layer { |
26 public: | 26 public: |
27 void SetResourceIds(int bar_text_resource_id, | 27 void SetResourceIds(int bar_text_resource_id, |
28 int panel_shadow_resource_id, | 28 int panel_shadow_resource_id, |
29 int bar_shadow_resource_id, | 29 int bar_shadow_resource_id, |
30 int panel_icon_resource_id, | 30 int panel_icon_resource_id, |
31 int close_icon_resource_id); | 31 int close_icon_resource_id, |
| 32 int handle_resource_id); |
32 | 33 |
33 void SetProperties(float dp_to_px, | 34 void SetProperties(float dp_to_px, |
34 const scoped_refptr<cc::Layer>& content_layer, | 35 const scoped_refptr<cc::Layer>& content_layer, |
35 float content_offset_y, | 36 float content_offset_y, |
36 float panel_x, | 37 float panel_x, |
37 float panel_y, | 38 float panel_y, |
38 float panel_width, | 39 float panel_width, |
39 float panel_height, | 40 float panel_height, |
40 float bar_margin_side, | 41 float bar_margin_side, |
41 float bar_height, | 42 float bar_height, |
42 float bar_offset_y, | 43 float bar_offset_y, |
43 float bar_text_opacity, | 44 float bar_text_opacity, |
44 bool bar_border_visible, | 45 bool bar_border_visible, |
45 float bar_border_height, | 46 float bar_border_height, |
46 bool bar_shadow_visible, | 47 bool bar_shadow_visible, |
47 float bar_shadow_opacity, | 48 float bar_shadow_opacity, |
48 float close_icon_opacity); | 49 float close_icon_opacity, |
| 50 float bar_handle_offset_y, |
| 51 float bar_padding_bottom); |
49 | 52 |
50 scoped_refptr<cc::Layer> layer() override; | 53 scoped_refptr<cc::Layer> layer() override; |
51 | 54 |
52 protected: | 55 protected: |
53 explicit OverlayPanelLayer(ui::ResourceManager* resource_manager); | 56 explicit OverlayPanelLayer(ui::ResourceManager* resource_manager); |
54 ~OverlayPanelLayer() override; | 57 ~OverlayPanelLayer() override; |
55 | 58 |
56 virtual scoped_refptr<cc::Layer> GetIconLayer(); | 59 virtual scoped_refptr<cc::Layer> GetIconLayer(); |
57 void AddBarTextLayer(scoped_refptr<cc::Layer> text_layer); | 60 void AddBarTextLayer(scoped_refptr<cc::Layer> text_layer); |
58 | 61 |
59 ui::ResourceManager* resource_manager_; | 62 ui::ResourceManager* resource_manager_; |
60 scoped_refptr<cc::Layer> layer_; | 63 scoped_refptr<cc::Layer> layer_; |
61 | 64 |
62 scoped_refptr<cc::NinePatchLayer> panel_shadow_; | 65 scoped_refptr<cc::NinePatchLayer> panel_shadow_; |
63 scoped_refptr<cc::SolidColorLayer> bar_background_; | 66 scoped_refptr<cc::SolidColorLayer> bar_background_; |
64 scoped_refptr<cc::UIResourceLayer> bar_text_; | 67 scoped_refptr<cc::UIResourceLayer> bar_text_; |
65 scoped_refptr<cc::UIResourceLayer> bar_shadow_; | 68 scoped_refptr<cc::UIResourceLayer> bar_shadow_; |
66 scoped_refptr<cc::UIResourceLayer> panel_icon_; | 69 scoped_refptr<cc::UIResourceLayer> panel_icon_; |
67 scoped_refptr<cc::UIResourceLayer> close_icon_; | 70 scoped_refptr<cc::UIResourceLayer> close_icon_; |
68 scoped_refptr<cc::Layer> content_container_; | 71 scoped_refptr<cc::Layer> content_container_; |
69 scoped_refptr<cc::Layer> text_container_; | 72 scoped_refptr<cc::Layer> text_container_; |
70 scoped_refptr<cc::SolidColorLayer> bar_border_; | 73 scoped_refptr<cc::SolidColorLayer> bar_border_; |
| 74 scoped_refptr<cc::UIResourceLayer> bar_handle_; |
| 75 scoped_refptr<cc::Layer> bar_content_layer_; |
71 | 76 |
72 int panel_icon_resource_id_; | 77 int panel_icon_resource_id_; |
73 int bar_text_resource_id_; | 78 int bar_text_resource_id_; |
74 int panel_shadow_resource_id_; | 79 int panel_shadow_resource_id_; |
75 int bar_shadow_resource_id_; | 80 int bar_shadow_resource_id_; |
76 int close_icon_resource_id_; | 81 int close_icon_resource_id_; |
| 82 int bar_handle_resource_id_; |
| 83 |
| 84 int bar_content_height_; |
77 }; | 85 }; |
78 | 86 |
79 } // namespace android | 87 } // namespace android |
80 | 88 |
81 #endif // CHROME_BROWSER_ANDROID_COMPOSITOR_LAYER_OVERLAY_PANEL_LAYER_H_ | 89 #endif // CHROME_BROWSER_ANDROID_COMPOSITOR_LAYER_OVERLAY_PANEL_LAYER_H_ |
OLD | NEW |