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

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

Issue 1518543002: Adds MD ink ripple animations to buttons within location bar (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adds MD ink ripple animations to buttons within location bar (reverted a bad change) Created 4 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_BUTTON_H_ 5 #ifndef UI_VIEWS_CONTROLS_BUTTON_BUTTON_H_
6 #define UI_VIEWS_CONTROLS_BUTTON_BUTTON_H_ 6 #define UI_VIEWS_CONTROLS_BUTTON_BUTTON_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "ui/native_theme/native_theme.h" 9 #include "ui/native_theme/native_theme.h"
10 #include "ui/views/view.h" 10 #include "ui/views/view.h"
11 #include "ui/views/widget/widget_observer_view.h"
11 12
12 namespace views { 13 namespace views {
13 14
14 class Button; 15 class Button;
15 class Event; 16 class Event;
16 17
17 // An interface implemented by an object to let it know that a button was 18 // An interface implemented by an object to let it know that a button was
18 // pressed. 19 // pressed.
19 class VIEWS_EXPORT ButtonListener { 20 class VIEWS_EXPORT ButtonListener {
20 public: 21 public:
21 virtual void ButtonPressed(Button* sender, const ui::Event& event) = 0; 22 virtual void ButtonPressed(Button* sender, const ui::Event& event) = 0;
22 23
23 protected: 24 protected:
24 virtual ~ButtonListener() {} 25 virtual ~ButtonListener() {}
25 }; 26 };
26 27
27 // A View representing a button. Depending on the specific type, the button 28 // A View representing a button. Depending on the specific type, the button
28 // could be implemented by a native control or custom rendered. 29 // could be implemented by a native control or custom rendered.
29 class VIEWS_EXPORT Button : public View { 30 class VIEWS_EXPORT Button : public WidgetObserverView {
sadrul 2016/01/28 17:45:06 We shouldn't do this, of course.
varkha 2016/01/28 20:09:19 Done.
30 public: 31 public:
31 ~Button() override; 32 ~Button() override;
32 33
33 // Button states for various button sub-types. 34 // Button states for various button sub-types.
34 enum ButtonState { 35 enum ButtonState {
35 STATE_NORMAL = 0, 36 STATE_NORMAL = 0,
36 STATE_HOVERED, 37 STATE_HOVERED,
37 STATE_PRESSED, 38 STATE_PRESSED,
38 STATE_DISABLED, 39 STATE_DISABLED,
39 STATE_COUNT, 40 STATE_COUNT,
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 // The id tag associated with this button. Used to disambiguate buttons in 89 // The id tag associated with this button. Used to disambiguate buttons in
89 // the ButtonListener implementation. 90 // the ButtonListener implementation.
90 int tag_; 91 int tag_;
91 92
92 DISALLOW_COPY_AND_ASSIGN(Button); 93 DISALLOW_COPY_AND_ASSIGN(Button);
93 }; 94 };
94 95
95 } // namespace views 96 } // namespace views
96 97
97 #endif // UI_VIEWS_CONTROLS_BUTTON_BUTTON_H_ 98 #endif // UI_VIEWS_CONTROLS_BUTTON_BUTTON_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698