Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5649)

Unified Diff: chrome/browser/ui/views/toolbar/toolbar_action_view.h

Issue 1411833006: Refactoring to make adding ink drop animations easier (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Refactor ink drop animations (moved ACTION_PENDING handling to toolbar_action_view for now) Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 243b59a86676b7086ecd2d4268ddfdb46437a87d..16c1adc939695a96aafe4013de151dbe7f81a0c3 100644
--- a/chrome/browser/ui/views/toolbar/toolbar_action_view.h
+++ b/chrome/browser/ui/views/toolbar/toolbar_action_view.h
@@ -28,7 +28,6 @@ class Image;
}
namespace views {
-class InkDropAnimationController;
class MenuItemView;
class MenuRunner;
}
@@ -79,7 +78,6 @@ class ToolbarActionView : public views::MenuButton,
// views::MenuButtonListener:
void OnMenuButtonClicked(views::View* sender,
const gfx::Point& point) override;
- void OnMenuButtonClickCanceled(views::View* sender) override;
// content::NotificationObserver:
void Observe(int type,
@@ -117,17 +115,15 @@ class ToolbarActionView : public views::MenuButton,
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::InkDropHost:
+ gfx::Point CalculateInkDropCenter() const override;
- views::InkDropAnimationController* ink_drop_animation_controller() {
- return ink_drop_animation_controller_.get();
- }
+ // views::View:
+ views::InkDropDelegate* GetInkDropDelegate() const override;
private:
// views::MenuButton:
gfx::Size GetPreferredSize() const override;
- void Layout() override;
bool OnMousePressed(const ui::MouseEvent& event) override;
void OnGestureEvent(ui::GestureEvent* event) override;
void OnDragDone() override;
@@ -191,8 +187,8 @@ class ToolbarActionView : public views::MenuButton,
content::NotificationRegistrar registrar_;
- // Animation controller for the ink drop ripple effect.
- scoped_ptr<views::InkDropAnimationController> ink_drop_animation_controller_;
+ // Animation delegate for the ink drop ripple effect.
+ scoped_ptr<views::InkDropDelegate> ink_drop_delegate_;
base::WeakPtrFactory<ToolbarActionView> weak_factory_;

Powered by Google App Engine
This is Rietveld 408576698