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

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

Issue 2542883004: Bottom browser controls position based on window height (Closed)
Patch Set: rebase Created 4 years 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 "base/memory/ptr_util.h" 8 #include "base/memory/ptr_util.h"
9 #include "cc/layers/layer.h" 9 #include "cc/layers/layer.h"
10 #include "cc/layers/layer_collections.h" 10 #include "cc/layers/layer_collections.h"
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 //-------------------------------------------------------------------------- 228 //--------------------------------------------------------------------------
229 229
230 // TODO(kkimlabs): Tab switcher doesn't show the progress bar. 230 // TODO(kkimlabs): Tab switcher doesn't show the progress bar.
231 toolbar_layer_->PushResource(toolbar_resource_id, 231 toolbar_layer_->PushResource(toolbar_resource_id,
232 toolbar_background_color, 232 toolbar_background_color,
233 anonymize_toolbar, 233 anonymize_toolbar,
234 toolbar_textbox_background_color, 234 toolbar_textbox_background_color,
235 toolbar_textbox_resource_id, 235 toolbar_textbox_resource_id,
236 toolbar_textbox_alpha, 236 toolbar_textbox_alpha,
237 view_height, 237 view_height,
238 // TODO(mdjones): Feels odd to pass 0 here when
239 // we have access to toolbar_y_offset.
240 0,
238 false, 241 false,
239 false, 242 false,
240 browser_controls_at_bottom); 243 browser_controls_at_bottom);
241 toolbar_layer_->UpdateProgressBar(0, 0, 0, 0, 0, 0, 0, 0, 0, 0); 244 toolbar_layer_->UpdateProgressBar(0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
242 245
243 float toolbar_impact_height = 0; 246 float toolbar_impact_height = 0;
244 if (show_toolbar && !back_visible) 247 if (show_toolbar && !back_visible && !browser_controls_at_bottom)
245 toolbar_impact_height = toolbar_layer_->layer()->bounds().height(); 248 toolbar_impact_height = toolbar_layer_->layer()->bounds().height();
246 249
247 //---------------------------------------------------------------------------- 250 //----------------------------------------------------------------------------
248 // Compute Alpha and Visibility 251 // Compute Alpha and Visibility
249 //---------------------------------------------------------------------------- 252 //----------------------------------------------------------------------------
250 border_alpha *= alpha; 253 border_alpha *= alpha;
251 contour_alpha *= alpha; 254 contour_alpha *= alpha;
252 shadow_alpha *= alpha; 255 shadow_alpha *= alpha;
253 close_alpha *= alpha; 256 close_alpha *= alpha;
254 toolbar_alpha *= alpha; 257 toolbar_alpha *= alpha;
(...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after
678 title_->RemoveAllChildren(); 681 title_->RemoveAllChildren();
679 title_->AddChild(layer); 682 title_->AddChild(layer);
680 } 683 }
681 } 684 }
682 685
683 if (title) 686 if (title)
684 title->SetUIResourceIds(); 687 title->SetUIResourceIds();
685 } 688 }
686 689
687 } // namespace android 690 } // namespace android
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698