Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(342)

Side by Side Diff: chrome/browser/android/compositor/layer/contextual_search_layer.h

Issue 2363843002: [Contextual Search] Animate thumbnail appearance (Closed)
Patch Set: Changes from donnd@ review Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
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, 78 bool thumbnail_visible,
79 float thumbnail_visibility_percentage,
79 int thumbnail_size, 80 int thumbnail_size,
80 float arrow_icon_opacity, 81 float arrow_icon_opacity,
81 float arrow_icon_rotation, 82 float arrow_icon_rotation,
82 float close_icon_opacity, 83 float close_icon_opacity,
83 bool progress_bar_visible, 84 bool progress_bar_visible,
84 float progress_bar_height, 85 float progress_bar_height,
85 float progress_bar_opacity, 86 float progress_bar_opacity,
86 int progress_bar_completion); 87 int progress_bar_completion);
87 88
88 void SetThumbnail(const SkBitmap* thumbnail); 89 void SetThumbnail(const SkBitmap* thumbnail);
89 90
90 protected: 91 protected:
91 explicit ContextualSearchLayer(ui::ResourceManager* resource_manager); 92 explicit ContextualSearchLayer(ui::ResourceManager* resource_manager);
92 ~ContextualSearchLayer() override; 93 ~ContextualSearchLayer() override;
93 scoped_refptr<cc::Layer> GetIconLayer() override; 94 scoped_refptr<cc::Layer> GetIconLayer() override;
94 95
95 private: 96 private:
96 bool search_provider_icon_sprite_visible_; 97 // Sets up |icon_layer_|, which displays an icon or thumbnail at the start
97 int search_provider_icon_sprite_metadata_resource_id_; 98 // of the Bar.
98 float search_provider_icon_sprite_completion_percentage_; 99 void SetupIconLayer(bool search_provider_icon_sprite_visible,
99 bool thumbnail_visible_; 100 int search_provider_icon_sprite_metadata_resource_id,
101 float search_provider_icon_sprite_completion_percentage,
102 bool thumbnail_visible,
103 float thumbnail_visibility_percentage);
104
100 int thumbnail_size_; 105 int thumbnail_size_;
106 float thumbnail_side_margin_;
107 float thumbnail_top_margin_;
101 108
102 scoped_refptr<cc::UIResourceLayer> search_context_; 109 scoped_refptr<cc::UIResourceLayer> search_context_;
110 scoped_refptr<cc::Layer> icon_layer_;
103 scoped_refptr<CrushedSpriteLayer> search_provider_icon_sprite_; 111 scoped_refptr<CrushedSpriteLayer> search_provider_icon_sprite_;
104 scoped_refptr<cc::UIResourceLayer> thumbnail_layer_; 112 scoped_refptr<cc::UIResourceLayer> thumbnail_layer_;
105 scoped_refptr<cc::UIResourceLayer> arrow_icon_; 113 scoped_refptr<cc::UIResourceLayer> arrow_icon_;
106 scoped_refptr<cc::UIResourceLayer> search_promo_; 114 scoped_refptr<cc::UIResourceLayer> search_promo_;
107 scoped_refptr<cc::SolidColorLayer> search_promo_container_; 115 scoped_refptr<cc::SolidColorLayer> search_promo_container_;
108 scoped_refptr<cc::SolidColorLayer> peek_promo_container_; 116 scoped_refptr<cc::SolidColorLayer> peek_promo_container_;
109 scoped_refptr<cc::NinePatchLayer> peek_promo_ripple_; 117 scoped_refptr<cc::NinePatchLayer> peek_promo_ripple_;
110 scoped_refptr<cc::UIResourceLayer> peek_promo_text_; 118 scoped_refptr<cc::UIResourceLayer> peek_promo_text_;
111 scoped_refptr<cc::NinePatchLayer> progress_bar_; 119 scoped_refptr<cc::NinePatchLayer> progress_bar_;
112 scoped_refptr<cc::NinePatchLayer> progress_bar_background_; 120 scoped_refptr<cc::NinePatchLayer> progress_bar_background_;
113 scoped_refptr<cc::UIResourceLayer> search_caption_; 121 scoped_refptr<cc::UIResourceLayer> search_caption_;
114 }; 122 };
115 123
116 } // namespace android 124 } // namespace android
117 } // namespace chrome 125 } // namespace chrome
118 126
119 #endif // CHROME_BROWSER_ANDROID_COMPOSITOR_LAYER_CONTEXTUAL_SEARCH_LAYER_H_ 127 #endif // CHROME_BROWSER_ANDROID_COMPOSITOR_LAYER_CONTEXTUAL_SEARCH_LAYER_H_
OLDNEW
« no previous file with comments | « chrome/android/java_sources.gni ('k') | chrome/browser/android/compositor/layer/contextual_search_layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698