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

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

Issue 935163002: [Extensions Toolbar Views] Override ShouldEnterPushedState in ToolbarActionView (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 months 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 debef333beb1f5088abe4de16a87f846b28ca603..60b67f010c044a1db941868eecae254762f7457a 100644
--- a/chrome/browser/ui/views/toolbar/toolbar_action_view.h
+++ b/chrome/browser/ui/views/toolbar/toolbar_action_view.h
@@ -87,6 +87,10 @@ class ToolbarActionView : public views::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.
+ // TODO(devlin): This is a good idea, but it has some funny UI side-effects,
+ // like the fact that label buttons enter a pressed state immediately, but
+ // menu buttons only enter a pressed state on release (if they're draggable).
+ // We should probably just pick a behavior, and stick to it.
bool Activate() override;
bool OnMousePressed(const ui::MouseEvent& event) override;
void OnMouseReleased(const ui::MouseEvent& event) override;
@@ -94,6 +98,7 @@ class ToolbarActionView : public views::MenuButton,
bool OnKeyReleased(const ui::KeyEvent& event) override;
void OnGestureEvent(ui::GestureEvent* event) override;
scoped_ptr<views::LabelButtonBorder> CreateDefaultBorder() const override;
+ bool ShouldEnterPushedState(const ui::Event& event) override;
// ToolbarActionViewDelegate: (public because called by others).
void UpdateState() override;

Powered by Google App Engine
This is Rietveld 408576698