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

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

Issue 1894383002: MacViews: Implement Full Keyboard Access. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@SetFocusBehavior
Patch Set: Rebased. Created 4 years, 8 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) 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_CUSTOM_BUTTON_H_ 5 #ifndef UI_VIEWS_CONTROLS_BUTTON_CUSTOM_BUTTON_H_
6 #define UI_VIEWS_CONTROLS_BUTTON_CUSTOM_BUTTON_H_ 6 #define UI_VIEWS_CONTROLS_BUTTON_CUSTOM_BUTTON_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "ui/events/event_constants.h" 11 #include "ui/events/event_constants.h"
12 #include "ui/gfx/animation/animation_delegate.h" 12 #include "ui/gfx/animation/animation_delegate.h"
13 #include "ui/gfx/animation/throb_animation.h" 13 #include "ui/gfx/animation/throb_animation.h"
14 #include "ui/views/animation/ink_drop_state.h" 14 #include "ui/views/animation/ink_drop_state.h"
15 #include "ui/views/controls/button/button.h" 15 #include "ui/views/controls/button/button.h"
16 16
17 namespace views { 17 namespace views {
18 18
19 class InkDropDelegate; 19 class InkDropDelegate;
20 20
21 // A button with custom rendering. The base of ImageButton and LabelButton. 21 // A button with custom rendering. The base of ImageButton and LabelButton.
22 // Note that this type of button is not focusable by default and will not be 22 // Note that this type of button is not focusable by default and will not be
23 // part of the focus chain. Call SetFocusBehavior(FocusBehavior::ALWAYS) to 23 // part of the focus chain, unless in accessibility mode. Call
tapted 2016/04/20 06:05:57 Where's the "unless in accessibility mode" bit tri
karandeepb 2016/05/03 02:54:12 This inherits from Button, which has a SetFocusBeh
24 // make it part of the focus chain. 24 // Button::ConfigureDefaultFocus() to make it part of the focus chain.
25 class VIEWS_EXPORT CustomButton : public Button, public gfx::AnimationDelegate { 25 class VIEWS_EXPORT CustomButton : public Button, public gfx::AnimationDelegate {
26 public: 26 public:
27 // An enum describing the events on which a button should notify its listener. 27 // An enum describing the events on which a button should notify its listener.
28 enum NotifyAction { 28 enum NotifyAction {
29 NOTIFY_ON_PRESS, 29 NOTIFY_ON_PRESS,
30 NOTIFY_ON_RELEASE, 30 NOTIFY_ON_RELEASE,
31 }; 31 };
32 32
33 // The menu button's class name. 33 // The menu button's class name.
34 static const char kViewClassName[]; 34 static const char kViewClassName[];
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 // because it needs to paint to a layer so it can extend beyond the bounds of 204 // because it needs to paint to a layer so it can extend beyond the bounds of
205 // |this|. 205 // |this|.
206 views::View* md_focus_ring_; 206 views::View* md_focus_ring_;
207 207
208 DISALLOW_COPY_AND_ASSIGN(CustomButton); 208 DISALLOW_COPY_AND_ASSIGN(CustomButton);
209 }; 209 };
210 210
211 } // namespace views 211 } // namespace views
212 212
213 #endif // UI_VIEWS_CONTROLS_BUTTON_CUSTOM_BUTTON_H_ 213 #endif // UI_VIEWS_CONTROLS_BUTTON_CUSTOM_BUTTON_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698