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 569 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
580 infobar_visible_(false), | 580 infobar_visible_(false), |
581 size_animation_(this), | 581 size_animation_(this), |
582 throbbing_view_(nullptr), | 582 throbbing_view_(nullptr), |
583 bookmark_bar_state_(BookmarkBar::SHOW), | 583 bookmark_bar_state_(BookmarkBar::SHOW), |
584 animating_detached_(false), | 584 animating_detached_(false), |
585 show_folder_method_factory_(this) { | 585 show_folder_method_factory_(this) { |
586 set_id(VIEW_ID_BOOKMARK_BAR); | 586 set_id(VIEW_ID_BOOKMARK_BAR); |
587 Init(); | 587 Init(); |
588 | 588 |
589 // Don't let the bookmarks show on top of the location bar while animating. | 589 // Don't let the bookmarks show on top of the location bar while animating. |
590 SetPaintToLayer(true); | 590 SetPaintToLayer(); |
591 layer()->SetMasksToBounds(true); | 591 layer()->SetMasksToBounds(true); |
592 layer()->SetFillsBoundsOpaquely(false); | 592 layer()->SetFillsBoundsOpaquely(false); |
593 | 593 |
594 size_animation_.Reset(1); | 594 size_animation_.Reset(1); |
595 } | 595 } |
596 | 596 |
597 BookmarkBarView::~BookmarkBarView() { | 597 BookmarkBarView::~BookmarkBarView() { |
598 if (model_) | 598 if (model_) |
599 model_->RemoveObserver(this); | 599 model_->RemoveObserver(this); |
600 | 600 |
(...skipping 1547 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2148 return; | 2148 return; |
2149 apps_page_shortcut_->SetVisible(visible); | 2149 apps_page_shortcut_->SetVisible(visible); |
2150 UpdateBookmarksSeparatorVisibility(); | 2150 UpdateBookmarksSeparatorVisibility(); |
2151 LayoutAndPaint(); | 2151 LayoutAndPaint(); |
2152 } | 2152 } |
2153 | 2153 |
2154 void BookmarkBarView::OnShowManagedBookmarksPrefChanged() { | 2154 void BookmarkBarView::OnShowManagedBookmarksPrefChanged() { |
2155 if (UpdateOtherAndManagedButtonsVisibility()) | 2155 if (UpdateOtherAndManagedButtonsVisibility()) |
2156 LayoutAndPaint(); | 2156 LayoutAndPaint(); |
2157 } | 2157 } |
OLD | NEW |