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

Side by Side Diff: chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc

Issue 1804343002: [MD] Fix bookmark bar button overflow during bar animation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/ui/views/bookmarks/bookmark_bar_view.h" 5 #include "chrome/browser/ui/views/bookmarks/bookmark_bar_view.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <limits> 10 #include <limits>
(...skipping 598 matching lines...) Expand 10 before | Expand all | Expand 10 after
609 browser_view_(browser_view), 609 browser_view_(browser_view),
610 infobar_visible_(false), 610 infobar_visible_(false),
611 size_animation_(this), 611 size_animation_(this),
612 throbbing_view_(NULL), 612 throbbing_view_(NULL),
613 bookmark_bar_state_(BookmarkBar::SHOW), 613 bookmark_bar_state_(BookmarkBar::SHOW),
614 animating_detached_(false), 614 animating_detached_(false),
615 show_folder_method_factory_(this) { 615 show_folder_method_factory_(this) {
616 set_id(VIEW_ID_BOOKMARK_BAR); 616 set_id(VIEW_ID_BOOKMARK_BAR);
617 Init(); 617 Init();
618 618
619 if (ui::MaterialDesignController::IsModeMaterial()) {
620 // Don't let the bookmarks show on top of the location bar while animating.
621 SetPaintToLayer(true);
622 layer()->SetFillsBoundsOpaquely(false);
623 layer()->SetMasksToBounds(true);
624 }
625
619 size_animation_.Reset(1); 626 size_animation_.Reset(1);
620 } 627 }
621 628
622 BookmarkBarView::~BookmarkBarView() { 629 BookmarkBarView::~BookmarkBarView() {
623 if (model_) 630 if (model_)
624 model_->RemoveObserver(this); 631 model_->RemoveObserver(this);
625 632
626 // It's possible for the menu to outlive us, reset the observer to make sure 633 // It's possible for the menu to outlive us, reset the observer to make sure
627 // it doesn't have a reference to us. 634 // it doesn't have a reference to us.
628 if (bookmark_menu_) { 635 if (bookmark_menu_) {
(...skipping 1521 matching lines...) Expand 10 before | Expand all | Expand 10 after
2150 return; 2157 return;
2151 apps_page_shortcut_->SetVisible(visible); 2158 apps_page_shortcut_->SetVisible(visible);
2152 UpdateBookmarksSeparatorVisibility(); 2159 UpdateBookmarksSeparatorVisibility();
2153 LayoutAndPaint(); 2160 LayoutAndPaint();
2154 } 2161 }
2155 2162
2156 void BookmarkBarView::OnShowManagedBookmarksPrefChanged() { 2163 void BookmarkBarView::OnShowManagedBookmarksPrefChanged() {
2157 if (UpdateOtherAndManagedButtonsVisibility()) 2164 if (UpdateOtherAndManagedButtonsVisibility())
2158 LayoutAndPaint(); 2165 LayoutAndPaint();
2159 } 2166 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698