Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 587 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 598 throbbing_view_(nullptr), | 598 throbbing_view_(nullptr), |
| 599 bookmark_bar_state_(BookmarkBar::SHOW), | 599 bookmark_bar_state_(BookmarkBar::SHOW), |
| 600 animating_detached_(false), | 600 animating_detached_(false), |
| 601 show_folder_method_factory_(this) { | 601 show_folder_method_factory_(this) { |
| 602 set_id(VIEW_ID_BOOKMARK_BAR); | 602 set_id(VIEW_ID_BOOKMARK_BAR); |
| 603 Init(); | 603 Init(); |
| 604 | 604 |
| 605 // Don't let the bookmarks show on top of the location bar while animating. | 605 // Don't let the bookmarks show on top of the location bar while animating. |
| 606 SetPaintToLayer(); | 606 SetPaintToLayer(); |
| 607 layer()->SetMasksToBounds(true); | 607 layer()->SetMasksToBounds(true); |
| 608 layer()->SetFillsBoundsOpaquely(false); | 608 layer()->SetFillsBoundsOpaquely(true); |
|
sky
2017/05/26 13:40:53
I'm surprised this would work. Don't we need the t
yiyix
2017/05/26 18:30:33
I believe that it's opaque for both attached and d
| |
| 609 | 609 |
| 610 size_animation_.Reset(1); | 610 size_animation_.Reset(1); |
| 611 } | 611 } |
| 612 | 612 |
| 613 BookmarkBarView::~BookmarkBarView() { | 613 BookmarkBarView::~BookmarkBarView() { |
| 614 if (model_) | 614 if (model_) |
| 615 model_->RemoveObserver(this); | 615 model_->RemoveObserver(this); |
| 616 | 616 |
| 617 // It's possible for the menu to outlive us, reset the observer to make sure | 617 // It's possible for the menu to outlive us, reset the observer to make sure |
| 618 // it doesn't have a reference to us. | 618 // it doesn't have a reference to us. |
| (...skipping 1546 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2165 return; | 2165 return; |
| 2166 apps_page_shortcut_->SetVisible(visible); | 2166 apps_page_shortcut_->SetVisible(visible); |
| 2167 UpdateBookmarksSeparatorVisibility(); | 2167 UpdateBookmarksSeparatorVisibility(); |
| 2168 LayoutAndPaint(); | 2168 LayoutAndPaint(); |
| 2169 } | 2169 } |
| 2170 | 2170 |
| 2171 void BookmarkBarView::OnShowManagedBookmarksPrefChanged() { | 2171 void BookmarkBarView::OnShowManagedBookmarksPrefChanged() { |
| 2172 if (UpdateOtherAndManagedButtonsVisibility()) | 2172 if (UpdateOtherAndManagedButtonsVisibility()) |
| 2173 LayoutAndPaint(); | 2173 LayoutAndPaint(); |
| 2174 } | 2174 } |
| OLD | NEW |