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

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

Issue 1268483004: Plumb the anonymize rect color to toolbar_layer from Tab#getThemeColor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@tabHasThemeColor
Patch Set: Renamed BrandColorUtils in implementation Created 5 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 #include "chrome/browser/android/compositor/layer/tab_layer.h" 5 #include "chrome/browser/android/compositor/layer/tab_layer.h"
6 6
7 #include "base/i18n/rtl.h" 7 #include "base/i18n/rtl.h"
8 #include "cc/layers/layer.h" 8 #include "cc/layers/layer.h"
9 #include "cc/layers/layer_lists.h" 9 #include "cc/layers/layer_lists.h"
10 #include "cc/layers/nine_patch_layer.h" 10 #include "cc/layers/nine_patch_layer.h"
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 float saturation, 89 float saturation,
90 float brightness, 90 float brightness,
91 float close_btn_width, 91 float close_btn_width,
92 float static_to_view_blend, 92 float static_to_view_blend,
93 float content_width, 93 float content_width,
94 float content_height, 94 float content_height,
95 float view_width, 95 float view_width,
96 float view_height, 96 float view_height,
97 bool show_toolbar, 97 bool show_toolbar,
98 bool anonymize_toolbar, 98 bool anonymize_toolbar,
99 int toolbar_textbox_background_color,
99 float toolbar_alpha, 100 float toolbar_alpha,
100 float toolbar_y_offset, 101 float toolbar_y_offset,
101 float side_border_scale, 102 float side_border_scale,
102 bool attach_content, 103 bool attach_content,
103 bool inset_border) { 104 bool inset_border) {
104 if (alpha <= 0) { 105 if (alpha <= 0) {
105 layer_->SetHideLayerAndSubtree(true); 106 layer_->SetHideLayerAndSubtree(true);
106 return; 107 return;
107 } 108 }
108 109
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 const float close_btn_effective_width = close_btn_width * close_alpha; 176 const float close_btn_effective_width = close_btn_width * close_alpha;
176 177
177 float toolbar_impact_height = 0; 178 float toolbar_impact_height = 0;
178 if (toolbar_resource) { 179 if (toolbar_resource) {
179 //-------------------------------------------------------------------------- 180 //--------------------------------------------------------------------------
180 // Update Resource Ids For Layers That Impact Layout 181 // Update Resource Ids For Layers That Impact Layout
181 //-------------------------------------------------------------------------- 182 //--------------------------------------------------------------------------
182 183
183 // TODO(kkimlabs): Tab switcher doesn't show the progress bar. 184 // TODO(kkimlabs): Tab switcher doesn't show the progress bar.
184 toolbar_layer_->PushResource(toolbar_resource, anonymize_toolbar, 185 toolbar_layer_->PushResource(toolbar_resource, anonymize_toolbar,
185 incognito_, false, 1.f); 186 toolbar_textbox_background_color, false, 1.f);
186 toolbar_layer_->UpdateProgressBar(0, 0, 0, 0, 0, 0, 0, 0, 0, 0); 187 toolbar_layer_->UpdateProgressBar(0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
187 188
188 if (show_toolbar && !back_visible) 189 if (show_toolbar && !back_visible)
189 toolbar_impact_height = toolbar_resource->padding.height(); 190 toolbar_impact_height = toolbar_resource->padding.height();
190 } 191 }
191 192
192 //---------------------------------------------------------------------------- 193 //----------------------------------------------------------------------------
193 // Compute Alpha and Visibility 194 // Compute Alpha and Visibility
194 //---------------------------------------------------------------------------- 195 //----------------------------------------------------------------------------
195 border_alpha *= alpha; 196 border_alpha *= alpha;
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after
586 title_->AddChild(layer); 587 title_->AddChild(layer);
587 } 588 }
588 } 589 }
589 590
590 if (title) 591 if (title)
591 title->SetUIResourceIds(); 592 title->SetUIResourceIds();
592 } 593 }
593 594
594 } // namespace android 595 } // namespace android
595 } // namespace chrome 596 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/android/compositor/layer/tab_layer.h ('k') | chrome/browser/android/compositor/layer/toolbar_layer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698