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

Side by Side Diff: ui/views/controls/button/menu_button.h

Issue 1409183003: Adds ripple animation to extension buttons on a toolbar (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adds ripple animation to extension buttons on a toolbar (rebased) 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_VIEWS_CONTROLS_BUTTON_MENU_BUTTON_H_ 5 #ifndef UI_VIEWS_CONTROLS_BUTTON_MENU_BUTTON_H_
6 #define UI_VIEWS_CONTROLS_BUTTON_MENU_BUTTON_H_ 6 #define UI_VIEWS_CONTROLS_BUTTON_MENU_BUTTON_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 menu_marker_ = menu_marker; 57 menu_marker_ = menu_marker;
58 } 58 }
59 const gfx::ImageSkia* menu_marker() const { return menu_marker_; } 59 const gfx::ImageSkia* menu_marker() const { return menu_marker_; }
60 60
61 const gfx::Point& menu_offset() const { return menu_offset_; } 61 const gfx::Point& menu_offset() const { return menu_offset_; }
62 void set_menu_offset(int x, int y) { menu_offset_.SetPoint(x, y); } 62 void set_menu_offset(int x, int y) { menu_offset_.SetPoint(x, y); }
63 63
64 // Activate the button (called when the button is pressed). 64 // Activate the button (called when the button is pressed).
65 bool Activate(); 65 bool Activate();
66 66
67 // Called to signal that the action will not be activated.
68 void WillNotActivate();
69
67 // Overridden from View: 70 // Overridden from View:
68 gfx::Size GetPreferredSize() const override; 71 gfx::Size GetPreferredSize() const override;
69 const char* GetClassName() const override; 72 const char* GetClassName() const override;
70 void OnPaint(gfx::Canvas* canvas) override; 73 void OnPaint(gfx::Canvas* canvas) override;
71 bool OnMousePressed(const ui::MouseEvent& event) override; 74 bool OnMousePressed(const ui::MouseEvent& event) override;
72 void OnMouseReleased(const ui::MouseEvent& event) override; 75 void OnMouseReleased(const ui::MouseEvent& event) override;
73 void OnMouseEntered(const ui::MouseEvent& event) override; 76 void OnMouseEntered(const ui::MouseEvent& event) override;
74 void OnMouseExited(const ui::MouseEvent& event) override; 77 void OnMouseExited(const ui::MouseEvent& event) override;
75 void OnMouseMoved(const ui::MouseEvent& event) override; 78 void OnMouseMoved(const ui::MouseEvent& event) override;
76 void OnGestureEvent(ui::GestureEvent* event) override; 79 void OnGestureEvent(ui::GestureEvent* event) override;
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 bool should_disable_after_press_; 137 bool should_disable_after_press_;
135 138
136 base::WeakPtrFactory<MenuButton> weak_factory_; 139 base::WeakPtrFactory<MenuButton> weak_factory_;
137 140
138 DISALLOW_COPY_AND_ASSIGN(MenuButton); 141 DISALLOW_COPY_AND_ASSIGN(MenuButton);
139 }; 142 };
140 143
141 } // namespace views 144 } // namespace views
142 145
143 #endif // UI_VIEWS_CONTROLS_BUTTON_MENU_BUTTON_H_ 146 #endif // UI_VIEWS_CONTROLS_BUTTON_MENU_BUTTON_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698