Chromium Code Reviews| Index: chrome/browser/ui/views/toolbar/browser_actions_container.cc |
| diff --git a/chrome/browser/ui/views/toolbar/browser_actions_container.cc b/chrome/browser/ui/views/toolbar/browser_actions_container.cc |
| index 5ed94f3e2f00e37eb91ffd966dbf4b2c33d79a12..84f745f70832baed96728a814605a813dbe570b5 100644 |
| --- a/chrome/browser/ui/views/toolbar/browser_actions_container.cc |
| +++ b/chrome/browser/ui/views/toolbar/browser_actions_container.cc |
| @@ -18,6 +18,7 @@ |
| #include "chrome/browser/ui/views/extensions/browser_action_drag_data.h" |
| #include "chrome/browser/ui/views/extensions/extension_keybinding_registry_views.h" |
| #include "chrome/browser/ui/views/extensions/extension_popup.h" |
| +#include "chrome/browser/ui/views/frame/browser_view.h" |
| #include "chrome/browser/ui/views/toolbar/browser_actions_container_observer.h" |
| #include "chrome/browser/ui/views/toolbar/toolbar_view.h" |
| #include "chrome/common/extensions/command.h" |
| @@ -283,10 +284,10 @@ void BrowserActionsContainer::OnBrowserActionViewDragDone() { |
| } |
| views::View* BrowserActionsContainer::GetOverflowReferenceView() { |
| - // We should only need an overflow reference when using the traditional |
| - // chevron overflow. |
| - DCHECK(chevron_); |
| - return chevron_; |
| + // With traditional overflow, the reference is the chevron. With the |
| + // redesign, we use the wrench menu instead. |
| + return chevron_ ? chevron_ : |
| + BrowserView::GetBrowserViewForBrowser(browser_)->toolbar()->app_menu(); |
|
Peter Kasting
2014/09/11 20:23:13
Nit: I'd probably wrap like this to ensure the arm
Devlin
2014/09/11 20:53:42
Sure, done.
|
| } |
| void BrowserActionsContainer::SetPopupOwner(BrowserActionView* popup_owner) { |
| @@ -300,6 +301,12 @@ void BrowserActionsContainer::HideActivePopup() { |
| popup_owner_->view_controller()->HidePopup(); |
| } |
| +BrowserActionView* BrowserActionsContainer::GetMainViewForExtension( |
| + const Extension* extension) { |
| + return in_overflow_mode() ? main_container_->GetViewForExtension(extension) : |
| + GetViewForExtension(extension); |
|
Peter Kasting
2014/09/11 20:23:13
Tiny nit: Personally, I think this indentation is
Devlin
2014/09/11 20:53:42
I don't feel strongly, so happy to oblige. :)
|
| +} |
| + |
| void BrowserActionsContainer::AddObserver( |
| BrowserActionsContainerObserver* observer) { |
| observers_.AddObserver(observer); |