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

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

Issue 1978943002: [MD] Fix detached bookmark bar top separator in hdpi (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: iterate on comment Created 4 years, 7 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 | chrome/browser/ui/views/frame/browser_view.cc » ('j') | 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 608 matching lines...) Expand 10 before | Expand all | Expand 10 after
619 bookmark_bar_state_(BookmarkBar::SHOW), 619 bookmark_bar_state_(BookmarkBar::SHOW),
620 animating_detached_(false), 620 animating_detached_(false),
621 show_folder_method_factory_(this) { 621 show_folder_method_factory_(this) {
622 set_id(VIEW_ID_BOOKMARK_BAR); 622 set_id(VIEW_ID_BOOKMARK_BAR);
623 Init(); 623 Init();
624 624
625 if (ui::MaterialDesignController::IsModeMaterial()) { 625 if (ui::MaterialDesignController::IsModeMaterial()) {
626 // Don't let the bookmarks show on top of the location bar while animating. 626 // Don't let the bookmarks show on top of the location bar while animating.
627 SetPaintToLayer(true); 627 SetPaintToLayer(true);
628 layer()->SetMasksToBounds(true); 628 layer()->SetMasksToBounds(true);
629 layer()->SetFillsBoundsOpaquely(false);
629 } 630 }
630 631
631 size_animation_.Reset(1); 632 size_animation_.Reset(1);
632 } 633 }
633 634
634 BookmarkBarView::~BookmarkBarView() { 635 BookmarkBarView::~BookmarkBarView() {
635 if (model_) 636 if (model_)
636 model_->RemoveObserver(this); 637 model_->RemoveObserver(this);
637 638
638 // It's possible for the menu to outlive us, reset the observer to make sure 639 // It's possible for the menu to outlive us, reset the observer to make sure
(...skipping 1523 matching lines...) Expand 10 before | Expand all | Expand 10 after
2162 return; 2163 return;
2163 apps_page_shortcut_->SetVisible(visible); 2164 apps_page_shortcut_->SetVisible(visible);
2164 UpdateBookmarksSeparatorVisibility(); 2165 UpdateBookmarksSeparatorVisibility();
2165 LayoutAndPaint(); 2166 LayoutAndPaint();
2166 } 2167 }
2167 2168
2168 void BookmarkBarView::OnShowManagedBookmarksPrefChanged() { 2169 void BookmarkBarView::OnShowManagedBookmarksPrefChanged() {
2169 if (UpdateOtherAndManagedButtonsVisibility()) 2170 if (UpdateOtherAndManagedButtonsVisibility())
2170 LayoutAndPaint(); 2171 LayoutAndPaint();
2171 } 2172 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/views/frame/browser_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698