OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 CHROME_VIEWS_CONTROLS_BUTTON_BUTTON_H_ | 5 #ifndef CHROME_VIEWS_CONTROLS_BUTTON_BUTTON_H_ |
6 #define CHROME_VIEWS_CONTROLS_BUTTON_BUTTON_H_ | 6 #define CHROME_VIEWS_CONTROLS_BUTTON_BUTTON_H_ |
7 | 7 |
8 #include "chrome/views/view.h" | 8 #include "chrome/views/view.h" |
9 | 9 |
10 namespace views { | 10 namespace views { |
(...skipping 17 matching lines...) Expand all Loading... |
28 | 28 |
29 int tag() const { return tag_; } | 29 int tag() const { return tag_; } |
30 void set_tag(int tag) { tag_ = tag; } | 30 void set_tag(int tag) { tag_ = tag; } |
31 | 31 |
32 int mouse_event_flags() const { return mouse_event_flags_; } | 32 int mouse_event_flags() const { return mouse_event_flags_; } |
33 | 33 |
34 // Overridden from View: | 34 // Overridden from View: |
35 virtual bool GetTooltipText(int x, int y, std::wstring* tooltip); | 35 virtual bool GetTooltipText(int x, int y, std::wstring* tooltip); |
36 virtual bool GetAccessibleKeyboardShortcut(std::wstring* shortcut); | 36 virtual bool GetAccessibleKeyboardShortcut(std::wstring* shortcut); |
37 virtual bool GetAccessibleName(std::wstring* name); | 37 virtual bool GetAccessibleName(std::wstring* name); |
| 38 virtual bool GetAccessibleRole(AccessibilityTypes::Role* role); |
38 virtual void SetAccessibleKeyboardShortcut(const std::wstring& shortcut); | 39 virtual void SetAccessibleKeyboardShortcut(const std::wstring& shortcut); |
39 virtual void SetAccessibleName(const std::wstring& name); | 40 virtual void SetAccessibleName(const std::wstring& name); |
40 | 41 |
41 protected: | 42 protected: |
42 // Construct the Button with a Listener. The listener can be NULL. This can be | 43 // Construct the Button with a Listener. The listener can be NULL. This can be |
43 // true of buttons that don't have a listener - e.g. menubuttons where there's | 44 // true of buttons that don't have a listener - e.g. menubuttons where there's |
44 // no default action and checkboxes. | 45 // no default action and checkboxes. |
45 explicit Button(ButtonListener* listener); | 46 explicit Button(ButtonListener* listener); |
46 | 47 |
47 // Cause the button to notify the listener that a click occurred. | 48 // Cause the button to notify the listener that a click occurred. |
(...skipping 16 matching lines...) Expand all Loading... |
64 | 65 |
65 // Event flags present when the button was clicked. | 66 // Event flags present when the button was clicked. |
66 int mouse_event_flags_; | 67 int mouse_event_flags_; |
67 | 68 |
68 DISALLOW_COPY_AND_ASSIGN(Button); | 69 DISALLOW_COPY_AND_ASSIGN(Button); |
69 }; | 70 }; |
70 | 71 |
71 } // namespace views | 72 } // namespace views |
72 | 73 |
73 #endif // CHROME_VIEWS_CONTROLS_BUTTON_BUTTON_H_ | 74 #endif // CHROME_VIEWS_CONTROLS_BUTTON_BUTTON_H_ |
OLD | NEW |