| OLD | NEW |
| 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 void SetTooltipText(const base::string16& tooltip_text); | 55 void SetTooltipText(const base::string16& tooltip_text); |
| 56 | 56 |
| 57 int tag() const { return tag_; } | 57 int tag() const { return tag_; } |
| 58 void set_tag(int tag) { tag_ = tag; } | 58 void set_tag(int tag) { tag_ = tag; } |
| 59 | 59 |
| 60 void SetAccessibleName(const base::string16& name); | 60 void SetAccessibleName(const base::string16& name); |
| 61 | 61 |
| 62 // Overridden from View: | 62 // Overridden from View: |
| 63 bool GetTooltipText(const gfx::Point& p, | 63 bool GetTooltipText(const gfx::Point& p, |
| 64 base::string16* tooltip) const override; | 64 base::string16* tooltip) const override; |
| 65 void GetAccessibleState(ui::AXViewState* state) override; | 65 void GetAccessibleNodeData(ui::AXNodeData* node_data) override; |
| 66 | 66 |
| 67 protected: | 67 protected: |
| 68 // Construct the Button with a Listener. The listener can be NULL. This can be | 68 // Construct the Button with a Listener. The listener can be NULL. This can be |
| 69 // true of buttons that don't have a listener - e.g. menubuttons where there's | 69 // true of buttons that don't have a listener - e.g. menubuttons where there's |
| 70 // no default action and checkboxes. | 70 // no default action and checkboxes. |
| 71 explicit Button(ButtonListener* listener); | 71 explicit Button(ButtonListener* listener); |
| 72 | 72 |
| 73 // Cause the button to notify the listener that a click occurred. | 73 // Cause the button to notify the listener that a click occurred. |
| 74 virtual void NotifyClick(const ui::Event& event); | 74 virtual void NotifyClick(const ui::Event& event); |
| 75 | 75 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 91 // 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 |
| 92 // the ButtonListener implementation. | 92 // the ButtonListener implementation. |
| 93 int tag_; | 93 int tag_; |
| 94 | 94 |
| 95 DISALLOW_COPY_AND_ASSIGN(Button); | 95 DISALLOW_COPY_AND_ASSIGN(Button); |
| 96 }; | 96 }; |
| 97 | 97 |
| 98 } // namespace views | 98 } // namespace views |
| 99 | 99 |
| 100 #endif // UI_VIEWS_CONTROLS_BUTTON_BUTTON_H_ | 100 #endif // UI_VIEWS_CONTROLS_BUTTON_BUTTON_H_ |
| OLD | NEW |