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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 float search_context_opacity, | 68 float search_context_opacity, |
69 float search_term_opacity, | 69 float search_term_opacity, |
70 float search_caption_animation_percentage, | 70 float search_caption_animation_percentage, |
71 bool search_caption_visible, | 71 bool search_caption_visible, |
72 bool search_bar_border_visible, | 72 bool search_bar_border_visible, |
73 float search_bar_border_height, | 73 float search_bar_border_height, |
74 bool search_bar_shadow_visible, | 74 bool search_bar_shadow_visible, |
75 float search_bar_shadow_opacity, | 75 float search_bar_shadow_opacity, |
76 bool search_provider_icon_sprite_visible, | 76 bool search_provider_icon_sprite_visible, |
77 float search_provider_icon_sprite_completion_percentage, | 77 float search_provider_icon_sprite_completion_percentage, |
| 78 bool thumbnail_visible, |
| 79 int thumbnail_size, |
78 float arrow_icon_opacity, | 80 float arrow_icon_opacity, |
79 float arrow_icon_rotation, | 81 float arrow_icon_rotation, |
80 float close_icon_opacity, | 82 float close_icon_opacity, |
81 bool progress_bar_visible, | 83 bool progress_bar_visible, |
82 float progress_bar_height, | 84 float progress_bar_height, |
83 float progress_bar_opacity, | 85 float progress_bar_opacity, |
84 int progress_bar_completion); | 86 int progress_bar_completion); |
85 | 87 |
| 88 void SetThumbnail(const SkBitmap* thumbnail); |
| 89 |
86 protected: | 90 protected: |
87 explicit ContextualSearchLayer(ui::ResourceManager* resource_manager); | 91 explicit ContextualSearchLayer(ui::ResourceManager* resource_manager); |
88 ~ContextualSearchLayer() override; | 92 ~ContextualSearchLayer() override; |
89 scoped_refptr<cc::Layer> GetIconLayer() override; | 93 scoped_refptr<cc::Layer> GetIconLayer() override; |
90 | 94 |
91 private: | 95 private: |
92 bool search_provider_icon_sprite_visible_; | 96 bool search_provider_icon_sprite_visible_; |
93 int search_provider_icon_sprite_metadata_resource_id_; | 97 int search_provider_icon_sprite_metadata_resource_id_; |
94 float search_provider_icon_sprite_completion_percentage_; | 98 float search_provider_icon_sprite_completion_percentage_; |
| 99 bool thumbnail_visible_; |
| 100 int thumbnail_size_; |
95 | 101 |
96 scoped_refptr<cc::UIResourceLayer> search_context_; | 102 scoped_refptr<cc::UIResourceLayer> search_context_; |
97 scoped_refptr<CrushedSpriteLayer> search_provider_icon_sprite_; | 103 scoped_refptr<CrushedSpriteLayer> search_provider_icon_sprite_; |
| 104 scoped_refptr<cc::UIResourceLayer> thumbnail_layer_; |
98 scoped_refptr<cc::UIResourceLayer> arrow_icon_; | 105 scoped_refptr<cc::UIResourceLayer> arrow_icon_; |
99 scoped_refptr<cc::UIResourceLayer> search_promo_; | 106 scoped_refptr<cc::UIResourceLayer> search_promo_; |
100 scoped_refptr<cc::SolidColorLayer> search_promo_container_; | 107 scoped_refptr<cc::SolidColorLayer> search_promo_container_; |
101 scoped_refptr<cc::SolidColorLayer> peek_promo_container_; | 108 scoped_refptr<cc::SolidColorLayer> peek_promo_container_; |
102 scoped_refptr<cc::NinePatchLayer> peek_promo_ripple_; | 109 scoped_refptr<cc::NinePatchLayer> peek_promo_ripple_; |
103 scoped_refptr<cc::UIResourceLayer> peek_promo_text_; | 110 scoped_refptr<cc::UIResourceLayer> peek_promo_text_; |
104 scoped_refptr<cc::NinePatchLayer> progress_bar_; | 111 scoped_refptr<cc::NinePatchLayer> progress_bar_; |
105 scoped_refptr<cc::NinePatchLayer> progress_bar_background_; | 112 scoped_refptr<cc::NinePatchLayer> progress_bar_background_; |
106 scoped_refptr<cc::UIResourceLayer> search_caption_; | 113 scoped_refptr<cc::UIResourceLayer> search_caption_; |
107 }; | 114 }; |
108 | 115 |
109 } // namespace android | 116 } // namespace android |
110 } // namespace chrome | 117 } // namespace chrome |
111 | 118 |
112 #endif // CHROME_BROWSER_ANDROID_COMPOSITOR_LAYER_CONTEXTUAL_SEARCH_LAYER_H_ | 119 #endif // CHROME_BROWSER_ANDROID_COMPOSITOR_LAYER_CONTEXTUAL_SEARCH_LAYER_H_ |
OLD | NEW |