| 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 608 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |