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

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

Issue 2293573002: Add tinted static UI resource cache (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: clean up Created 4 years, 3 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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 float brightness, 81 float brightness,
82 float close_btn_width, 82 float close_btn_width,
83 float static_to_view_blend, 83 float static_to_view_blend,
84 float content_width, 84 float content_width,
85 float content_height, 85 float content_height,
86 float view_width, 86 float view_width,
87 float view_height, 87 float view_height,
88 bool show_toolbar, 88 bool show_toolbar,
89 int default_theme_color, 89 int default_theme_color,
90 int toolbar_background_color, 90 int toolbar_background_color,
91 int default_close_button_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);
101 102
102 bool is_incognito() const { return incognito_; } 103 bool is_incognito() const { return incognito_; }
103 104
104 scoped_refptr<cc::Layer> layer() override; 105 scoped_refptr<cc::Layer> layer() override;
105 106
106 static void ComputePaddingPositions(const gfx::Size& content_size, 107 static void ComputePaddingPositions(const gfx::Size& content_size,
107 const gfx::Size& desired_size, 108 const gfx::Size& desired_size,
108 gfx::Rect* side_padding_rect, 109 gfx::Rect* side_padding_rect,
109 gfx::Rect* bottom_padding_rect); 110 gfx::Rect* bottom_padding_rect);
110 111
111 protected: 112 protected:
112 TabLayer(bool incognito, 113 TabLayer(bool incognito,
113 ui::ResourceManager* resource_manager, 114 ui::ResourceManager* resource_manager,
114 LayerTitleCache* layer_title_cache, 115 LayerTitleCache* layer_title_cache,
115 TabContentManager* tab_content_manager); 116 TabContentManager* tab_content_manager);
116 ~TabLayer() override; 117 ~TabLayer() override;
117 118
118 private: 119 private:
119 void SetTitle(DecorationTitle* title); 120 void SetTitle(DecorationTitle* title);
120 std::unique_ptr<cc::FilterOperations> createSolidColorFilter(int color);
121 121
122 const bool incognito_; 122 const bool incognito_;
123 bool toolbar_background_color_;
124 bool close_button_color_;
125 bool tab_switcher_themes_enabled_;
126 ui::ResourceManager* resource_manager_; 123 ui::ResourceManager* resource_manager_;
127 LayerTitleCache* layer_title_cache_; 124 LayerTitleCache* layer_title_cache_;
128 125
129 // [layer]-+-[toolbar] 126 // [layer]-+-[toolbar]
130 // +-[close button] 127 // +-[close button]
131 // +-[title] 128 // +-[title]
132 // +-[front border] 129 // +-[front border]
133 // +-[content] 130 // +-[content]
134 // +-[back_logo] 131 // +-[back_logo]
135 // +-[padding] 132 // +-[padding]
(...skipping 15 matching lines...) Expand all
151 scoped_refptr<cc::UIResourceLayer> back_logo_; 148 scoped_refptr<cc::UIResourceLayer> back_logo_;
152 float brightness_; 149 float brightness_;
153 150
154 DISALLOW_COPY_AND_ASSIGN(TabLayer); 151 DISALLOW_COPY_AND_ASSIGN(TabLayer);
155 }; 152 };
156 153
157 } // namespace android 154 } // namespace android
158 } // namespace chrome 155 } // namespace chrome
159 156
160 #endif // CHROME_BROWSER_ANDROID_COMPOSITOR_LAYER_TAB_LAYER_H_ 157 #endif // CHROME_BROWSER_ANDROID_COMPOSITOR_LAYER_TAB_LAYER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698