| 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" |
| 11 | 11 |
| 12 namespace cc { | 12 namespace cc { |
| 13 class Layer; | 13 class Layer; |
| 14 class NinePatchLayer; | 14 class NinePatchLayer; |
| 15 class SolidColorLayer; | 15 class SolidColorLayer; |
| 16 class UIResourceLayer; | 16 class UIResourceLayer; |
| 17 } | 17 } |
| 18 | 18 |
| 19 namespace content { | 19 namespace content { |
| 20 class ContentViewCore; | 20 class ContentViewCore; |
| 21 } | 21 } |
| 22 | 22 |
| 23 namespace ui { | 23 namespace ui { |
| 24 class ResourceManager; | 24 class ResourceManager; |
| 25 } | 25 } |
| 26 | 26 |
| 27 namespace chrome { | 27 namespace chrome { |
| 28 namespace android { | 28 namespace android { |
| 29 | 29 |
| 30 class CrushedSpriteLayer; |
| 31 |
| 30 class ContextualSearchLayer : public Layer { | 32 class ContextualSearchLayer : public Layer { |
| 31 public: | 33 public: |
| 32 static scoped_refptr<ContextualSearchLayer> Create( | 34 static scoped_refptr<ContextualSearchLayer> Create( |
| 33 ui::ResourceManager* resource_manager); | 35 ui::ResourceManager* resource_manager); |
| 34 | 36 |
| 35 void SetProperties(int panel_shadow_resource_id, | 37 void SetProperties(int panel_shadow_resource_id, |
| 36 int search_context_resource_id, | 38 int search_context_resource_id, |
| 37 int search_term_resource_id, | 39 int search_term_resource_id, |
| 38 int search_bar_shadow_resource_id, | 40 int search_bar_shadow_resource_id, |
| 39 int search_provider_icon_resource_id, | 41 int search_provider_icon_resource_id, |
| (...skipping 12 matching lines...) Expand all Loading... |
| 52 float search_panel_height, | 54 float search_panel_height, |
| 53 float search_bar_margin_side, | 55 float search_bar_margin_side, |
| 54 float search_bar_height, | 56 float search_bar_height, |
| 55 float search_context_opacity, | 57 float search_context_opacity, |
| 56 float search_term_opacity, | 58 float search_term_opacity, |
| 57 bool search_bar_border_visible, | 59 bool search_bar_border_visible, |
| 58 float search_bar_border_y, | 60 float search_bar_border_y, |
| 59 float search_bar_border_height, | 61 float search_bar_border_height, |
| 60 bool search_bar_shadow_visible, | 62 bool search_bar_shadow_visible, |
| 61 float search_bar_shadow_opacity, | 63 float search_bar_shadow_opacity, |
| 64 bool search_provider_icon_sprite_visible, |
| 65 float search_provider_icon_sprite_size, |
| 66 std::vector<int> search_provider_icon_sprite_rects, |
| 67 bool search_provider_icon_sprite_paint_previous_frames, |
| 62 float arrow_icon_opacity, | 68 float arrow_icon_opacity, |
| 63 float arrow_icon_rotation, | 69 float arrow_icon_rotation, |
| 64 bool close_icon_visible, | 70 bool close_icon_visible, |
| 65 float close_icon_opacity, | 71 float close_icon_opacity, |
| 66 bool progress_bar_visible, | 72 bool progress_bar_visible, |
| 67 float progress_bar_y, | 73 float progress_bar_y, |
| 68 float progress_bar_height, | 74 float progress_bar_height, |
| 69 float progress_bar_opacity, | 75 float progress_bar_opacity, |
| 70 int progress_bar_completion); | 76 int progress_bar_completion); |
| 71 | 77 |
| 72 scoped_refptr<cc::Layer> layer() override; | 78 scoped_refptr<cc::Layer> layer() override; |
| 73 | 79 |
| 74 protected: | 80 protected: |
| 75 explicit ContextualSearchLayer(ui::ResourceManager* resource_manager); | 81 explicit ContextualSearchLayer(ui::ResourceManager* resource_manager); |
| 76 ~ContextualSearchLayer() override; | 82 ~ContextualSearchLayer() override; |
| 77 | 83 |
| 78 private: | 84 private: |
| 79 ui::ResourceManager* resource_manager_; | 85 ui::ResourceManager* resource_manager_; |
| 80 | 86 |
| 81 scoped_refptr<cc::Layer> layer_; | 87 scoped_refptr<cc::Layer> layer_; |
| 82 scoped_refptr<cc::NinePatchLayer> panel_shadow_; | 88 scoped_refptr<cc::NinePatchLayer> panel_shadow_; |
| 83 scoped_refptr<cc::SolidColorLayer> search_bar_background_; | 89 scoped_refptr<cc::SolidColorLayer> search_bar_background_; |
| 84 scoped_refptr<cc::UIResourceLayer> search_context_; | 90 scoped_refptr<cc::UIResourceLayer> search_context_; |
| 85 scoped_refptr<cc::UIResourceLayer> search_term_; | 91 scoped_refptr<cc::UIResourceLayer> search_term_; |
| 86 scoped_refptr<cc::UIResourceLayer> search_bar_shadow_; | 92 scoped_refptr<cc::UIResourceLayer> search_bar_shadow_; |
| 87 scoped_refptr<cc::UIResourceLayer> search_provider_icon_; | 93 scoped_refptr<CrushedSpriteLayer> search_provider_icon_sprite_; |
| 88 scoped_refptr<cc::UIResourceLayer> arrow_icon_; | 94 scoped_refptr<cc::UIResourceLayer> arrow_icon_; |
| 89 scoped_refptr<cc::UIResourceLayer> close_icon_; | 95 scoped_refptr<cc::UIResourceLayer> close_icon_; |
| 90 scoped_refptr<cc::Layer> content_view_container_; | 96 scoped_refptr<cc::Layer> content_view_container_; |
| 91 scoped_refptr<cc::SolidColorLayer> search_bar_border_; | 97 scoped_refptr<cc::SolidColorLayer> search_bar_border_; |
| 92 scoped_refptr<cc::NinePatchLayer> progress_bar_; | 98 scoped_refptr<cc::NinePatchLayer> progress_bar_; |
| 93 scoped_refptr<cc::NinePatchLayer> progress_bar_background_; | 99 scoped_refptr<cc::NinePatchLayer> progress_bar_background_; |
| 94 scoped_refptr<cc::UIResourceLayer> search_promo_; | 100 scoped_refptr<cc::UIResourceLayer> search_promo_; |
| 95 scoped_refptr<cc::SolidColorLayer> search_promo_container_; | 101 scoped_refptr<cc::SolidColorLayer> search_promo_container_; |
| 96 }; | 102 }; |
| 97 | 103 |
| 98 } // namespace android | 104 } // namespace android |
| 99 } // namespace chrome | 105 } // namespace chrome |
| 100 | 106 |
| 101 #endif // CHROME_BROWSER_ANDROID_COMPOSITOR_LAYER_CONTEXTUAL_SEARCH_LAYER_H_ | 107 #endif // CHROME_BROWSER_ANDROID_COMPOSITOR_LAYER_CONTEXTUAL_SEARCH_LAYER_H_ |
| OLD | NEW |