| Index: chrome/browser/ui/views/toolbar/toolbar_action_view.h
|
| diff --git a/chrome/browser/ui/views/toolbar/toolbar_action_view.h b/chrome/browser/ui/views/toolbar/toolbar_action_view.h
|
| index 19db601bd4259643ec4d5a6c19e8b5d3521556f4..7d8a3cc822147d7662d4e27b45393732bc230587 100644
|
| --- a/chrome/browser/ui/views/toolbar/toolbar_action_view.h
|
| +++ b/chrome/browser/ui/views/toolbar/toolbar_action_view.h
|
| @@ -8,6 +8,7 @@
|
| #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/animation/ink_drop_host.h"
|
| #include "ui/views/context_menu_controller.h"
|
| #include "ui/views/controls/button/menu_button.h"
|
| #include "ui/views/controls/button/menu_button_listener.h"
|
| @@ -26,6 +27,7 @@ class Image;
|
| }
|
|
|
| namespace views {
|
| +class InkDropAnimationController;
|
| class MenuRunner;
|
| }
|
|
|
| @@ -37,7 +39,8 @@ class ToolbarActionView : public views::MenuButton,
|
| public ToolbarActionViewDelegateViews,
|
| public views::MenuButtonListener,
|
| public views::ContextMenuController,
|
| - public content::NotificationObserver {
|
| + public content::NotificationObserver,
|
| + public views::InkDropHost {
|
| public:
|
| // Need DragController here because ToolbarActionView could be
|
| // dragged/dropped.
|
| @@ -98,9 +101,24 @@ class ToolbarActionView : public views::MenuButton,
|
|
|
| bool wants_to_run_for_testing() const { return wants_to_run_; }
|
|
|
| + // views::InkDropHost:
|
| + void AddInkDropLayer(ui::Layer* ink_drop_layer) override;
|
| + void RemoveInkDropLayer(ui::Layer* ink_drop_layer) override;
|
| +
|
| + protected:
|
| + // Returns the Point where the ink drop should be centered.
|
| + virtual gfx::Point CalculateInkDropCenter() const;
|
| +
|
| + views::InkDropAnimationController* ink_drop_animation_controller() {
|
| + return ink_drop_animation_controller_.get();
|
| + }
|
| +
|
| private:
|
| // views::MenuButton:
|
| gfx::Size GetPreferredSize() const override;
|
| + void Layout() override;
|
| + bool OnMousePressed(const ui::MouseEvent& event) override;
|
| + void OnMouseReleased(const ui::MouseEvent& event) override;
|
| void OnDragDone() override;
|
| void ViewHierarchyChanged(
|
| const ViewHierarchyChangedDetails& details) override;
|
| @@ -146,6 +164,9 @@ class ToolbarActionView : public views::MenuButton,
|
| // tab.
|
| bool wants_to_run_;
|
|
|
| + // Animation controller for the ink drop ripple effect.
|
| + scoped_ptr<views::InkDropAnimationController> ink_drop_animation_controller_;
|
| +
|
| // Responsible for running the menu.
|
| scoped_ptr<views::MenuRunner> menu_runner_;
|
|
|
|
|