OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_CONTEXTUAL_SEARCH_LAYER_H_ | 5 #ifndef CHROME_BROWSER_ANDROID_COMPOSITOR_LAYER_CONTEXTUAL_SEARCH_LAYER_H_ |
6 #define CHROME_BROWSER_ANDROID_COMPOSITOR_LAYER_CONTEXTUAL_SEARCH_LAYER_H_ | 6 #define CHROME_BROWSER_ANDROID_COMPOSITOR_LAYER_CONTEXTUAL_SEARCH_LAYER_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "chrome/browser/android/compositor/layer/layer.h" | 10 #include "chrome/browser/android/compositor/layer/layer.h" |
(...skipping 20 matching lines...) Expand all Loading... |
31 public: | 31 public: |
32 static scoped_refptr<ContextualSearchLayer> Create( | 32 static scoped_refptr<ContextualSearchLayer> Create( |
33 ui::ResourceManager* resource_manager); | 33 ui::ResourceManager* resource_manager); |
34 | 34 |
35 void SetProperties(int search_bar_background_resource_id, | 35 void SetProperties(int search_bar_background_resource_id, |
36 int search_bar_text_resource_id, | 36 int search_bar_text_resource_id, |
37 int search_bar_shadow_resource_id, | 37 int search_bar_shadow_resource_id, |
38 int search_provider_icon_resource_id, | 38 int search_provider_icon_resource_id, |
39 int search_icon_resource_id, | 39 int search_icon_resource_id, |
40 int arrow_up_resource_id, | 40 int arrow_up_resource_id, |
| 41 int close_icon_resource_id, |
41 int progress_bar_background_resource_id, | 42 int progress_bar_background_resource_id, |
42 int progress_bar_resource_id, | 43 int progress_bar_resource_id, |
43 int search_promo_resource_id, | 44 int search_promo_resource_id, |
44 content::ContentViewCore* content_view_core, | 45 content::ContentViewCore* content_view_core, |
45 bool search_promo_visible, | 46 bool search_promo_visible, |
46 float search_promo_height, | 47 float search_promo_height, |
47 float search_promo_opacity, | 48 float search_promo_opacity, |
48 float search_panel_y, | 49 float search_panel_y, |
49 float search_panel_width, | 50 float search_panel_width, |
50 float search_bar_margin_top, | 51 float search_bar_margin_top, |
51 float search_bar_margin_side, | 52 float search_bar_margin_side, |
52 float search_bar_height, | 53 float search_bar_height, |
53 float search_bar_text_opacity, | 54 float search_bar_text_opacity, |
54 bool search_bar_border_visible, | 55 bool search_bar_border_visible, |
55 float search_bar_border_y, | 56 float search_bar_border_y, |
56 float search_bar_border_height, | 57 float search_bar_border_height, |
57 bool search_bar_shadow_visible, | 58 bool search_bar_shadow_visible, |
58 float search_bar_shadow_opacity, | 59 float search_bar_shadow_opacity, |
59 bool side_search_provider_icon_visible, | 60 bool side_search_provider_icon_visible, |
60 float search_provider_icon_opacity, | 61 float search_provider_icon_opacity, |
61 bool search_icon_visible, | 62 bool search_icon_visible, |
62 float search_icon_opacity, | 63 float search_icon_opacity, |
63 bool arrow_icon_visible, | 64 bool arrow_icon_visible, |
64 float arrow_icon_opacity, | 65 float arrow_icon_opacity, |
65 float arrow_icon_rotation, | 66 float arrow_icon_rotation, |
| 67 bool close_icon_visible, |
| 68 float close_icon_opacity, |
66 bool progress_bar_visible, | 69 bool progress_bar_visible, |
67 float progress_bar_y, | 70 float progress_bar_y, |
68 float progress_bar_height, | 71 float progress_bar_height, |
69 float progress_bar_opacity, | 72 float progress_bar_opacity, |
70 int progress_bar_completion); | 73 int progress_bar_completion); |
71 | 74 |
72 scoped_refptr<cc::Layer> layer() override; | 75 scoped_refptr<cc::Layer> layer() override; |
73 | 76 |
74 protected: | 77 protected: |
75 explicit ContextualSearchLayer(ui::ResourceManager* resource_manager); | 78 explicit ContextualSearchLayer(ui::ResourceManager* resource_manager); |
76 ~ContextualSearchLayer() override; | 79 ~ContextualSearchLayer() override; |
77 | 80 |
78 private: | 81 private: |
79 ui::ResourceManager* resource_manager_; | 82 ui::ResourceManager* resource_manager_; |
80 | 83 |
81 scoped_refptr<cc::Layer> layer_; | 84 scoped_refptr<cc::Layer> layer_; |
82 scoped_refptr<cc::NinePatchLayer> search_bar_background_; | 85 scoped_refptr<cc::NinePatchLayer> search_bar_background_; |
83 scoped_refptr<cc::UIResourceLayer> search_bar_text_; | 86 scoped_refptr<cc::UIResourceLayer> search_bar_text_; |
84 scoped_refptr<cc::UIResourceLayer> search_bar_shadow_; | 87 scoped_refptr<cc::UIResourceLayer> search_bar_shadow_; |
85 scoped_refptr<cc::UIResourceLayer> search_provider_icon_; | 88 scoped_refptr<cc::UIResourceLayer> search_provider_icon_; |
86 scoped_refptr<cc::UIResourceLayer> search_icon_; | 89 scoped_refptr<cc::UIResourceLayer> search_icon_; |
87 scoped_refptr<cc::UIResourceLayer> arrow_icon_; | 90 scoped_refptr<cc::UIResourceLayer> arrow_icon_; |
| 91 scoped_refptr<cc::UIResourceLayer> close_icon_; |
88 scoped_refptr<cc::Layer> content_view_container_; | 92 scoped_refptr<cc::Layer> content_view_container_; |
89 scoped_refptr<cc::SolidColorLayer> search_bar_border_; | 93 scoped_refptr<cc::SolidColorLayer> search_bar_border_; |
90 scoped_refptr<cc::NinePatchLayer> progress_bar_; | 94 scoped_refptr<cc::NinePatchLayer> progress_bar_; |
91 scoped_refptr<cc::NinePatchLayer> progress_bar_background_; | 95 scoped_refptr<cc::NinePatchLayer> progress_bar_background_; |
92 scoped_refptr<cc::UIResourceLayer> search_promo_; | 96 scoped_refptr<cc::UIResourceLayer> search_promo_; |
93 scoped_refptr<cc::SolidColorLayer> search_promo_container_; | 97 scoped_refptr<cc::SolidColorLayer> search_promo_container_; |
94 }; | 98 }; |
95 | 99 |
96 } // namespace android | 100 } // namespace android |
97 } // namespace chrome | 101 } // namespace chrome |
98 | 102 |
99 #endif // CHROME_BROWSER_ANDROID_COMPOSITOR_LAYER_CONTEXTUAL_SEARCH_LAYER_H_ | 103 #endif // CHROME_BROWSER_ANDROID_COMPOSITOR_LAYER_CONTEXTUAL_SEARCH_LAYER_H_ |
OLD | NEW |