| Index: chrome/browser/ui/views/toolbar/browser_action_view.h
|
| diff --git a/chrome/browser/ui/views/toolbar/browser_action_view.h b/chrome/browser/ui/views/toolbar/browser_action_view.h
|
| index 8f864c7739d7178552acab68f704036e463b5966..4fabcee45d2e34811def89ef7d4896b30ca5f35c 100644
|
| --- a/chrome/browser/ui/views/toolbar/browser_action_view.h
|
| +++ b/chrome/browser/ui/views/toolbar/browser_action_view.h
|
| @@ -5,7 +5,7 @@
|
| #ifndef CHROME_BROWSER_UI_VIEWS_TOOLBAR_BROWSER_ACTION_VIEW_H_
|
| #define CHROME_BROWSER_UI_VIEWS_TOOLBAR_BROWSER_ACTION_VIEW_H_
|
|
|
| -#include "chrome/browser/ui/views/toolbar/toolbar_action_view_delegate.h"
|
| +#include "chrome/browser/ui/views/toolbar/toolbar_action_view_delegate_views.h"
|
| #include "content/public/browser/notification_observer.h"
|
| #include "content/public/browser/notification_registrar.h"
|
| #include "ui/views/controls/button/menu_button.h"
|
| @@ -33,7 +33,7 @@ class Image;
|
| // TODO(devlin): Rename this and BrowserActionsContainer when more of the
|
| // toolbar redesign is done.
|
| class BrowserActionView : public views::MenuButton,
|
| - public ToolbarActionViewDelegate,
|
| + public ToolbarActionViewDelegateViews,
|
| public views::ButtonListener,
|
| public content::NotificationObserver {
|
| public:
|
| @@ -75,39 +75,35 @@ class BrowserActionView : public views::MenuButton,
|
| BrowserActionView(scoped_ptr<ToolbarActionViewController> view_controller,
|
| Browser* browser,
|
| Delegate* delegate);
|
| - virtual ~BrowserActionView();
|
| -
|
| - // Called to update the display to match the browser action's state.
|
| - void UpdateState();
|
| + ~BrowserActionView() override;
|
|
|
| // Overridden from views::View:
|
| - virtual void GetAccessibleState(ui::AXViewState* state) override;
|
| + void GetAccessibleState(ui::AXViewState* state) override;
|
|
|
| // Overridden from views::ButtonListener:
|
| - virtual void ButtonPressed(views::Button* sender,
|
| - const ui::Event& event) override;
|
| + void ButtonPressed(views::Button* sender, const ui::Event& event) override;
|
|
|
| // Overridden from content::NotificationObserver:
|
| - virtual void Observe(int type,
|
| - const content::NotificationSource& source,
|
| - const content::NotificationDetails& details) override;
|
| + void Observe(int type,
|
| + const content::NotificationSource& source,
|
| + const content::NotificationDetails& details) override;
|
|
|
| // MenuButton behavior overrides. These methods all default to LabelButton
|
| // behavior unless this button is a popup. In that case, it uses MenuButton
|
| // behavior. MenuButton has the notion of a child popup being shown where the
|
| // button will stay in the pushed state until the "menu" (a popup in this
|
| // case) is dismissed.
|
| - virtual bool Activate() override;
|
| - virtual bool OnMousePressed(const ui::MouseEvent& event) override;
|
| - virtual void OnMouseReleased(const ui::MouseEvent& event) override;
|
| - virtual void OnMouseExited(const ui::MouseEvent& event) override;
|
| - virtual bool OnKeyReleased(const ui::KeyEvent& event) override;
|
| - virtual void OnGestureEvent(ui::GestureEvent* event) override;
|
| - virtual scoped_ptr<views::LabelButtonBorder> CreateDefaultBorder() const
|
| - override;
|
| + bool Activate() override;
|
| + bool OnMousePressed(const ui::MouseEvent& event) override;
|
| + void OnMouseReleased(const ui::MouseEvent& event) override;
|
| + void OnMouseExited(const ui::MouseEvent& event) override;
|
| + bool OnKeyReleased(const ui::KeyEvent& event) override;
|
| + void OnGestureEvent(ui::GestureEvent* event) override;
|
| + scoped_ptr<views::LabelButtonBorder> CreateDefaultBorder() const override;
|
|
|
| // ToolbarActionViewDelegate: (public because called by others).
|
| - virtual content::WebContents* GetCurrentWebContents() const override;
|
| + void UpdateState() override;
|
| + content::WebContents* GetCurrentWebContents() const override;
|
|
|
| ToolbarActionViewController* view_controller() {
|
| return view_controller_.get();
|
| @@ -119,26 +115,24 @@ class BrowserActionView : public views::MenuButton,
|
|
|
| private:
|
| // Overridden from views::View:
|
| - virtual void ViewHierarchyChanged(
|
| - const ViewHierarchyChangedDetails& details) override;
|
| - virtual void OnDragDone() override;
|
| - virtual gfx::Size GetPreferredSize() const override;
|
| - virtual void PaintChildren(gfx::Canvas* canvas,
|
| - const views::CullSet& cull_set) override;
|
| -
|
| - // ToolbarActionViewDelegate:
|
| - virtual views::View* GetAsView() override;
|
| - virtual bool IsShownInMenu() override;
|
| - virtual views::FocusManager* GetFocusManagerForAccelerator() override;
|
| - virtual views::Widget* GetParentForContextMenu() override;
|
| - virtual ToolbarActionViewController* GetPreferredPopupViewController()
|
| + void ViewHierarchyChanged(const ViewHierarchyChangedDetails& details)
|
| override;
|
| - virtual views::View* GetReferenceViewForPopup() override;
|
| - virtual views::MenuButton* GetContextMenuButton() override;
|
| - virtual void HideActivePopup() override;
|
| - virtual void OnIconUpdated() override;
|
| - virtual void OnPopupShown(bool grant_tab_permissions) override;
|
| - virtual void CleanupPopup() override;
|
| + void OnDragDone() override;
|
| + gfx::Size GetPreferredSize() const override;
|
| + void PaintChildren(gfx::Canvas* canvas,
|
| + const views::CullSet& cull_set) override;
|
| +
|
| + // ToolbarActionViewDelegateViews:
|
| + views::View* GetAsView() override;
|
| + bool IsShownInMenu() override;
|
| + views::FocusManager* GetFocusManagerForAccelerator() override;
|
| + views::Widget* GetParentForContextMenu() override;
|
| + ToolbarActionViewController* GetPreferredPopupViewController() override;
|
| + views::View* GetReferenceViewForPopup() override;
|
| + views::MenuButton* GetContextMenuButton() override;
|
| + void HideActivePopup() override;
|
| + void OnPopupShown(bool grant_tab_permissions) override;
|
| + void CleanupPopup() override;
|
|
|
| // A lock to keep the MenuButton pressed when a menu or popup is visible.
|
| // This needs to be destroyed after |view_controller_|, because
|
|
|