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 <algorithm> | 7 #include <algorithm> |
8 #include <limits> | 8 #include <limits> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 608 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
619 } | 619 } |
620 | 620 |
621 views::MenuItemView* BookmarkBarView::GetContextMenu() { | 621 views::MenuItemView* BookmarkBarView::GetContextMenu() { |
622 return bookmark_menu_ ? bookmark_menu_->context_menu() : NULL; | 622 return bookmark_menu_ ? bookmark_menu_->context_menu() : NULL; |
623 } | 623 } |
624 | 624 |
625 views::MenuItemView* BookmarkBarView::GetDropMenu() { | 625 views::MenuItemView* BookmarkBarView::GetDropMenu() { |
626 return bookmark_drop_menu_ ? bookmark_drop_menu_->menu() : NULL; | 626 return bookmark_drop_menu_ ? bookmark_drop_menu_->menu() : NULL; |
627 } | 627 } |
628 | 628 |
629 views::View* BookmarkBarView::GetBookmarkBarInstructionsView() { | |
630 if (instructions_->visible()) | |
631 return instructions_; | |
632 return NULL; | |
633 } | |
634 | |
635 void BookmarkBarView::StopThrobbing(bool immediate) { | 629 void BookmarkBarView::StopThrobbing(bool immediate) { |
636 if (!throbbing_view_) | 630 if (!throbbing_view_) |
637 return; | 631 return; |
638 | 632 |
639 // If not immediate, cycle through 2 more complete cycles. | 633 // If not immediate, cycle through 2 more complete cycles. |
640 throbbing_view_->StartThrobbing(immediate ? 0 : 4); | 634 throbbing_view_->StartThrobbing(immediate ? 0 : 4); |
641 throbbing_view_ = NULL; | 635 throbbing_view_ = NULL; |
642 } | 636 } |
643 | 637 |
644 // static | 638 // static |
(...skipping 1318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1963 DCHECK(apps_page_shortcut_); | 1957 DCHECK(apps_page_shortcut_); |
1964 // Only perform layout if required. | 1958 // Only perform layout if required. |
1965 bool visible = chrome::ShouldShowAppsShortcutInBookmarkBar( | 1959 bool visible = chrome::ShouldShowAppsShortcutInBookmarkBar( |
1966 browser_->profile(), browser_->host_desktop_type()); | 1960 browser_->profile(), browser_->host_desktop_type()); |
1967 if (apps_page_shortcut_->visible() == visible) | 1961 if (apps_page_shortcut_->visible() == visible) |
1968 return; | 1962 return; |
1969 apps_page_shortcut_->SetVisible(visible); | 1963 apps_page_shortcut_->SetVisible(visible); |
1970 UpdateBookmarksSeparatorVisibility(); | 1964 UpdateBookmarksSeparatorVisibility(); |
1971 Layout(); | 1965 Layout(); |
1972 } | 1966 } |
OLD | NEW |