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

Side by Side Diff: ui/views/controls/button/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, 7 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/animation/ink_drop_host_view.h" 10 #include "ui/views/animation/ink_drop_host_view.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 // Button styles with associated images and border painters. 42 // Button styles with associated images and border painters.
43 // TODO(msw): Add Menu, ComboBox, etc. 43 // TODO(msw): Add Menu, ComboBox, etc.
44 enum ButtonStyle { 44 enum ButtonStyle {
45 STYLE_BUTTON = 0, 45 STYLE_BUTTON = 0,
46 STYLE_TEXTBUTTON, 46 STYLE_TEXTBUTTON,
47 STYLE_COUNT, 47 STYLE_COUNT,
48 }; 48 };
49 49
50 static ButtonState GetButtonStateFrom(ui::NativeTheme::State state); 50 static ButtonState GetButtonStateFrom(ui::NativeTheme::State state);
51 51
52 // Make the |button| focusable as per the platform.
53 static void ConfigureDefaultFocus(Button* button);
54
52 void SetTooltipText(const base::string16& tooltip_text); 55 void SetTooltipText(const base::string16& tooltip_text);
53 56
54 int tag() const { return tag_; } 57 int tag() const { return tag_; }
55 void set_tag(int tag) { tag_ = tag; } 58 void set_tag(int tag) { tag_ = tag; }
56 59
57 void SetAccessibleName(const base::string16& name); 60 void SetAccessibleName(const base::string16& name);
58 61
59 // Overridden from View: 62 // Overridden from View:
60 bool GetTooltipText(const gfx::Point& p, 63 bool GetTooltipText(const gfx::Point& p,
61 base::string16* tooltip) const override; 64 base::string16* tooltip) const override;
(...skipping 26 matching lines...) Expand all
88 // The id tag associated with this button. Used to disambiguate buttons in 91 // The id tag associated with this button. Used to disambiguate buttons in
89 // the ButtonListener implementation. 92 // the ButtonListener implementation.
90 int tag_; 93 int tag_;
91 94
92 DISALLOW_COPY_AND_ASSIGN(Button); 95 DISALLOW_COPY_AND_ASSIGN(Button);
93 }; 96 };
94 97
95 } // namespace views 98 } // namespace views
96 99
97 #endif // UI_VIEWS_CONTROLS_BUTTON_BUTTON_H_ 100 #endif // UI_VIEWS_CONTROLS_BUTTON_BUTTON_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698