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

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

Issue 2228823003: When possible, draw the toolbar shadow with the compositor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 4 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_TAB_LAYER_H_ 5 #ifndef CHROME_BROWSER_ANDROID_COMPOSITOR_LAYER_TAB_LAYER_H_
6 #define CHROME_BROWSER_ANDROID_COMPOSITOR_LAYER_TAB_LAYER_H_ 6 #define CHROME_BROWSER_ANDROID_COMPOSITOR_LAYER_TAB_LAYER_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 class TabLayer : public Layer { 42 class TabLayer : public Layer {
43 public: 43 public:
44 static scoped_refptr<TabLayer> Create(bool incognito, 44 static scoped_refptr<TabLayer> Create(bool incognito,
45 ui::ResourceManager* resource_manager, 45 ui::ResourceManager* resource_manager,
46 LayerTitleCache* layer_title_cache, 46 LayerTitleCache* layer_title_cache,
47 TabContentManager* tab_content_manager); 47 TabContentManager* tab_content_manager);
48 48
49 void SetProperties(int id, 49 void SetProperties(int id,
50 bool can_use_live_layer, 50 bool can_use_live_layer,
51 int toolbar_resource_id, 51 int toolbar_resource_id,
52 int toolbar_shadow_resource_id,
52 int close_button_resource_id, 53 int close_button_resource_id,
53 int shadow_resource_id, 54 int shadow_resource_id,
54 int contour_resource_id, 55 int contour_resource_id,
55 int back_logo_resource_id, 56 int back_logo_resource_id,
56 int border_resource_id, 57 int border_resource_id,
57 int border_inner_shadow_resource_id, 58 int border_inner_shadow_resource_id,
58 int default_background_color, 59 int default_background_color,
59 int back_logo_color, 60 int back_logo_color,
60 bool is_portrait, 61 bool is_portrait,
61 float x, 62 float x,
(...skipping 28 matching lines...) Expand all
90 int toolbar_background_color, 91 int toolbar_background_color,
91 int close_button_color, 92 int close_button_color,
92 bool anonymize_toolbar, 93 bool anonymize_toolbar,
93 int toolbar_textbox_resource_id, 94 int toolbar_textbox_resource_id,
94 int toolbar_textbox_background_color, 95 int toolbar_textbox_background_color,
95 float toolbar_textbox_alpha, 96 float toolbar_textbox_alpha,
96 float toolbar_alpha, 97 float toolbar_alpha,
97 float toolbar_y_offset, 98 float toolbar_y_offset,
98 float side_border_scale, 99 float side_border_scale,
99 bool attach_content, 100 bool attach_content,
100 bool inset_border); 101 bool inset_border,
102 bool needs_toolbar_shadow);
101 103
102 bool is_incognito() const { return incognito_; } 104 bool is_incognito() const { return incognito_; }
103 105
104 scoped_refptr<cc::Layer> layer() override; 106 scoped_refptr<cc::Layer> layer() override;
105 107
106 static void ComputePaddingPositions(const gfx::Size& content_size, 108 static void ComputePaddingPositions(const gfx::Size& content_size,
107 const gfx::Size& desired_size, 109 const gfx::Size& desired_size,
108 gfx::Rect* side_padding_rect, 110 gfx::Rect* side_padding_rect,
109 gfx::Rect* bottom_padding_rect); 111 gfx::Rect* bottom_padding_rect);
110 112
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 scoped_refptr<cc::UIResourceLayer> back_logo_; 153 scoped_refptr<cc::UIResourceLayer> back_logo_;
152 float brightness_; 154 float brightness_;
153 155
154 DISALLOW_COPY_AND_ASSIGN(TabLayer); 156 DISALLOW_COPY_AND_ASSIGN(TabLayer);
155 }; 157 };
156 158
157 } // namespace android 159 } // namespace android
158 } // namespace chrome 160 } // namespace chrome
159 161
160 #endif // CHROME_BROWSER_ANDROID_COMPOSITOR_LAYER_TAB_LAYER_H_ 162 #endif // CHROME_BROWSER_ANDROID_COMPOSITOR_LAYER_TAB_LAYER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698