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 <memory> | 8 #include <memory> |
9 | 9 |
10 #include "chrome/browser/android/compositor/layer/overlay_panel_layer.h" | 10 #include "chrome/browser/android/compositor/layer/overlay_panel_layer.h" |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 float progress_bar_height, | 83 float progress_bar_height, |
84 float progress_bar_opacity, | 84 float progress_bar_opacity, |
85 int progress_bar_completion, | 85 int progress_bar_completion, |
86 float divider_line_visibility_percentage, | 86 float divider_line_visibility_percentage, |
87 float divider_line_width, | 87 float divider_line_width, |
88 float divider_line_height, | 88 float divider_line_height, |
89 int divider_line_color, | 89 int divider_line_color, |
90 float divider_line_x_offset, | 90 float divider_line_x_offset, |
91 bool touch_highlight_visible, | 91 bool touch_highlight_visible, |
92 float touch_highlight_x_offset, | 92 float touch_highlight_x_offset, |
93 float touch_highlight_width); | 93 float touch_highlight_width, |
| 94 int bar_handle_resource_id, |
| 95 float bar_handle_offset_y, |
| 96 float bar_padding_bottom); |
94 | 97 |
95 void SetThumbnail(const SkBitmap* thumbnail); | 98 void SetThumbnail(const SkBitmap* thumbnail); |
96 | 99 |
97 protected: | 100 protected: |
98 explicit ContextualSearchLayer(ui::ResourceManager* resource_manager); | 101 explicit ContextualSearchLayer(ui::ResourceManager* resource_manager); |
99 ~ContextualSearchLayer() override; | 102 ~ContextualSearchLayer() override; |
100 scoped_refptr<cc::Layer> GetIconLayer() override; | 103 scoped_refptr<cc::Layer> GetIconLayer() override; |
101 | 104 |
102 private: | 105 private: |
103 // Sets up |icon_layer_|, which displays an icon or thumbnail at the start | 106 // Sets up |icon_layer_|, which displays an icon or thumbnail at the start |
104 // of the Bar. | 107 // of the Bar. |
105 void SetupIconLayer(int search_provider_icon_resource_id, | 108 void SetupIconLayer(int search_provider_icon_resource_id, |
106 bool quick_action_icon_visible, | 109 bool quick_action_icon_visible, |
107 int quick_action_icon_resource_id, | 110 int quick_action_icon_resource_id, |
108 bool thumbnail_visible, | 111 bool thumbnail_visible, |
109 float custom_image_visibility_percentage); | 112 float custom_image_visibility_percentage); |
110 | 113 |
111 void SetCustomImageProperties( | 114 void SetCustomImageProperties( |
112 scoped_refptr<cc::UIResourceLayer> custom_image_layer, | 115 scoped_refptr<cc::UIResourceLayer> custom_image_layer, |
113 float top_margin, | 116 float top_margin, |
114 float side_margin, | 117 float side_margin, |
115 float visibility_percentage); | 118 float visibility_percentage); |
116 | 119 |
117 // Sets up |text_layer_|, which contains |bar_text_|, |search_context_| and | 120 // Sets up |text_layer_|, which contains |bar_text_|, |search_context_| and |
118 // |search_caption_|. | 121 // |search_caption_|. |
119 void SetupTextLayer(float search_bar_top, | 122 void SetupTextLayer(float search_bar_height, |
120 float search_bar_height, | |
121 float search_text_layer_min_height, | 123 float search_text_layer_min_height, |
122 int search_caption_resource_id, | 124 int search_caption_resource_id, |
123 bool search_caption_visible, | 125 bool search_caption_visible, |
124 float search_caption_animation_percentage, | 126 float search_caption_animation_percentage, |
125 float search_term_opacity, | 127 float search_term_opacity, |
126 int search_context_resource_id, | 128 int search_context_resource_id, |
127 float search_context_opacity, | 129 float search_context_opacity, |
128 float search_term_caption_spacing); | 130 float search_term_caption_spacing); |
129 | 131 |
130 int bar_image_size_; | 132 int bar_image_size_; |
(...skipping 15 matching lines...) Expand all Loading... |
146 scoped_refptr<cc::NinePatchLayer> progress_bar_background_; | 148 scoped_refptr<cc::NinePatchLayer> progress_bar_background_; |
147 scoped_refptr<cc::UIResourceLayer> search_caption_; | 149 scoped_refptr<cc::UIResourceLayer> search_caption_; |
148 scoped_refptr<cc::UIResourceLayer> text_layer_; | 150 scoped_refptr<cc::UIResourceLayer> text_layer_; |
149 scoped_refptr<cc::SolidColorLayer> divider_line_; | 151 scoped_refptr<cc::SolidColorLayer> divider_line_; |
150 scoped_refptr<cc::SolidColorLayer> touch_highlight_layer_; | 152 scoped_refptr<cc::SolidColorLayer> touch_highlight_layer_; |
151 }; | 153 }; |
152 | 154 |
153 } // namespace android | 155 } // namespace android |
154 | 156 |
155 #endif // CHROME_BROWSER_ANDROID_COMPOSITOR_LAYER_CONTEXTUAL_SEARCH_LAYER_H_ | 157 #endif // CHROME_BROWSER_ANDROID_COMPOSITOR_LAYER_CONTEXTUAL_SEARCH_LAYER_H_ |
OLD | NEW |