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

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

Issue 1478303003: Converted all Views to use an InkDropDelegate instead of a InkDropAnimationController. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge with master. Created 5 years 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_button.h
diff --git a/chrome/browser/ui/views/toolbar/toolbar_button.h b/chrome/browser/ui/views/toolbar/toolbar_button.h
index ca55dbac6e935626207d0160327b15844446a671..0feb40acc1518eb7e5b4b14a66211bd060f98b07 100644
--- a/chrome/browser/ui/views/toolbar/toolbar_button.h
+++ b/chrome/browser/ui/views/toolbar/toolbar_button.h
@@ -19,7 +19,7 @@ class MenuModel;
}
namespace views {
-class InkDropAnimationController;
+class InkDropDelegate;
class MenuRunner;
}
@@ -46,7 +46,6 @@ class ToolbarButton : public views::LabelButton,
// views::LabelButton:
gfx::Size GetPreferredSize() const override;
- void Layout() override;
bool OnMousePressed(const ui::MouseEvent& event) override;
bool OnMouseDragged(const ui::MouseEvent& event) override;
void OnMouseReleased(const ui::MouseEvent& event) override;
@@ -69,8 +68,6 @@ class ToolbarButton : public views::LabelButton,
protected:
// views::LabelButton:
bool ShouldEnterPushedState(const ui::Event& event) override;
- void NotifyClick(const ui::Event& event) override;
- void OnClickCanceled(const ui::Event& event) override;
// Returns if menu should be shown. Override this to change default behavior.
virtual bool ShouldShowMenu();
@@ -78,10 +75,6 @@ class ToolbarButton : public views::LabelButton,
// Function to show the dropdown menu.
virtual void ShowDropDownMenu(ui::MenuSourceType source_type);
- views::InkDropAnimationController* ink_drop_animation_controller() {
- return ink_drop_animation_controller_.get();
- }
-
private:
// views::LabelButton:
const char* GetClassName() const override;
@@ -104,8 +97,8 @@ class ToolbarButton : public views::LabelButton,
// Menu runner to display drop down menu.
scoped_ptr<views::MenuRunner> menu_runner_;
- // Animation controller for the ink drop ripple effect.
- scoped_ptr<views::InkDropAnimationController> ink_drop_animation_controller_;
+ // Controls the visual feedback for the button state.
+ scoped_ptr<views::InkDropDelegate> ink_drop_delegate_;
// A factory for tasks that show the dropdown context menu for the button.
base::WeakPtrFactory<ToolbarButton> show_menu_factory_;

Powered by Google App Engine
This is Rietveld 408576698