| 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 16 matching lines...) Expand all  Loading... | 
| 27 namespace chrome { | 27 namespace chrome { | 
| 28 namespace android { | 28 namespace android { | 
| 29 | 29 | 
| 30 class ContextualSearchLayer : public Layer { | 30 class ContextualSearchLayer : public Layer { | 
| 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_provider_icon_resource_id, | 38                      int search_provider_icon_resource_id, | 
| 38                      int search_icon_resource_id, | 39                      int search_icon_resource_id, | 
| 39                      int progress_bar_background_resource_id, | 40                      int progress_bar_background_resource_id, | 
| 40                      int progress_bar_resource_id, | 41                      int progress_bar_resource_id, | 
|  | 42                      int search_promo_resource_id, | 
| 41                      content::ContentViewCore* content_view_core, | 43                      content::ContentViewCore* content_view_core, | 
|  | 44                      bool search_promo_visible, | 
|  | 45                      float search_promo_height, | 
|  | 46                      float search_promo_opacity, | 
| 42                      float search_panel_y, | 47                      float search_panel_y, | 
| 43                      float search_panel_width, | 48                      float search_panel_width, | 
| 44                      float search_bar_margin_top, | 49                      float search_bar_margin_top, | 
| 45                      float search_bar_height, | 50                      float search_bar_height, | 
| 46                      float search_bar_text_opacity, | 51                      float search_bar_text_opacity, | 
| 47                      bool search_bar_border_visible, | 52                      bool search_bar_border_visible, | 
| 48                      float search_bar_border_y, | 53                      float search_bar_border_y, | 
| 49                      float search_bar_border_height, | 54                      float search_bar_border_height, | 
|  | 55                      bool search_bar_shadow_visible, | 
|  | 56                      float search_bar_shadow_opacity, | 
| 50                      float search_provider_icon_opacity, | 57                      float search_provider_icon_opacity, | 
| 51                      float search_icon_padding_left, | 58                      float search_icon_padding_left, | 
| 52                      float search_icon_opacity, | 59                      float search_icon_opacity, | 
| 53                      bool progress_bar_visible, | 60                      bool progress_bar_visible, | 
| 54                      float progress_bar_y, | 61                      float progress_bar_y, | 
| 55                      float progress_bar_height, | 62                      float progress_bar_height, | 
| 56                      float progress_bar_opacity, | 63                      float progress_bar_opacity, | 
| 57                      int progress_bar_completion); | 64                      int progress_bar_completion); | 
| 58 | 65 | 
| 59   scoped_refptr<cc::Layer> layer() override; | 66   scoped_refptr<cc::Layer> layer() override; | 
| 60 | 67 | 
| 61  protected: | 68  protected: | 
| 62   explicit ContextualSearchLayer(ui::ResourceManager* resource_manager); | 69   explicit ContextualSearchLayer(ui::ResourceManager* resource_manager); | 
| 63   ~ContextualSearchLayer() override; | 70   ~ContextualSearchLayer() override; | 
| 64 | 71 | 
| 65  private: | 72  private: | 
| 66   ui::ResourceManager* resource_manager_; | 73   ui::ResourceManager* resource_manager_; | 
| 67 | 74 | 
| 68   scoped_refptr<cc::Layer> layer_; | 75   scoped_refptr<cc::Layer> layer_; | 
| 69   scoped_refptr<cc::NinePatchLayer> search_bar_background_; | 76   scoped_refptr<cc::NinePatchLayer> search_bar_background_; | 
| 70   scoped_refptr<cc::UIResourceLayer> search_bar_text_; | 77   scoped_refptr<cc::UIResourceLayer> search_bar_text_; | 
|  | 78   scoped_refptr<cc::UIResourceLayer> search_bar_shadow_; | 
| 71   scoped_refptr<cc::UIResourceLayer> search_provider_icon_; | 79   scoped_refptr<cc::UIResourceLayer> search_provider_icon_; | 
| 72   scoped_refptr<cc::UIResourceLayer> search_icon_; | 80   scoped_refptr<cc::UIResourceLayer> search_icon_; | 
| 73   scoped_refptr<cc::UIResourceLayer> search_scroll_shadow_; |  | 
| 74   scoped_refptr<cc::Layer> content_view_container_; | 81   scoped_refptr<cc::Layer> content_view_container_; | 
| 75   scoped_refptr<cc::SolidColorLayer> search_bar_border_; | 82   scoped_refptr<cc::SolidColorLayer> search_bar_border_; | 
| 76   scoped_refptr<cc::NinePatchLayer> progress_bar_; | 83   scoped_refptr<cc::NinePatchLayer> progress_bar_; | 
| 77   scoped_refptr<cc::NinePatchLayer> progress_bar_background_; | 84   scoped_refptr<cc::NinePatchLayer> progress_bar_background_; | 
|  | 85   scoped_refptr<cc::UIResourceLayer> search_promo_; | 
|  | 86   scoped_refptr<cc::SolidColorLayer> search_promo_container_; | 
| 78 }; | 87 }; | 
| 79 | 88 | 
| 80 }  //  namespace android | 89 }  //  namespace android | 
| 81 }  //  namespace chrome | 90 }  //  namespace chrome | 
| 82 | 91 | 
| 83 #endif  // CHROME_BROWSER_ANDROID_COMPOSITOR_LAYER_CONTEXTUAL_SEARCH_LAYER_H_ | 92 #endif  // CHROME_BROWSER_ANDROID_COMPOSITOR_LAYER_CONTEXTUAL_SEARCH_LAYER_H_ | 
| OLD | NEW | 
|---|