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 <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_ && instructions_->visible()) | |
|
sky
2014/08/08 23:30:03
Is there a reason for the NULL check? instructions
evy
2014/08/09 02:26:52
Is there a chance that code could be added in the
sky
2014/08/11 16:26:58
If we start allowing it to be NULL we would have t
evy
2014/08/11 17:19:07
Done.
| |
| 631 return instructions_; | |
| 632 return NULL; | |
| 633 } | |
| 634 | |
| 629 void BookmarkBarView::StopThrobbing(bool immediate) { | 635 void BookmarkBarView::StopThrobbing(bool immediate) { |
| 630 if (!throbbing_view_) | 636 if (!throbbing_view_) |
| 631 return; | 637 return; |
| 632 | 638 |
| 633 // If not immediate, cycle through 2 more complete cycles. | 639 // If not immediate, cycle through 2 more complete cycles. |
| 634 throbbing_view_->StartThrobbing(immediate ? 0 : 4); | 640 throbbing_view_->StartThrobbing(immediate ? 0 : 4); |
| 635 throbbing_view_ = NULL; | 641 throbbing_view_ = NULL; |
| 636 } | 642 } |
| 637 | 643 |
| 638 // static | 644 // static |
| (...skipping 1318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1957 DCHECK(apps_page_shortcut_); | 1963 DCHECK(apps_page_shortcut_); |
| 1958 // Only perform layout if required. | 1964 // Only perform layout if required. |
| 1959 bool visible = chrome::ShouldShowAppsShortcutInBookmarkBar( | 1965 bool visible = chrome::ShouldShowAppsShortcutInBookmarkBar( |
| 1960 browser_->profile(), browser_->host_desktop_type()); | 1966 browser_->profile(), browser_->host_desktop_type()); |
| 1961 if (apps_page_shortcut_->visible() == visible) | 1967 if (apps_page_shortcut_->visible() == visible) |
| 1962 return; | 1968 return; |
| 1963 apps_page_shortcut_->SetVisible(visible); | 1969 apps_page_shortcut_->SetVisible(visible); |
| 1964 UpdateBookmarksSeparatorVisibility(); | 1970 UpdateBookmarksSeparatorVisibility(); |
| 1965 Layout(); | 1971 Layout(); |
| 1966 } | 1972 } |
| OLD | NEW |