| OLD | NEW |
| 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 "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "ui/events/event_constants.h" | 9 #include "ui/events/event_constants.h" |
| 10 #include "ui/gfx/animation/animation_delegate.h" | 10 #include "ui/gfx/animation/animation_delegate.h" |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 void OnMouseCaptureLost() override; | 87 void OnMouseCaptureLost() override; |
| 88 void OnMouseEntered(const ui::MouseEvent& event) override; | 88 void OnMouseEntered(const ui::MouseEvent& event) override; |
| 89 void OnMouseExited(const ui::MouseEvent& event) override; | 89 void OnMouseExited(const ui::MouseEvent& event) override; |
| 90 void OnMouseMoved(const ui::MouseEvent& event) override; | 90 void OnMouseMoved(const ui::MouseEvent& event) override; |
| 91 bool OnKeyPressed(const ui::KeyEvent& event) override; | 91 bool OnKeyPressed(const ui::KeyEvent& event) override; |
| 92 bool OnKeyReleased(const ui::KeyEvent& event) override; | 92 bool OnKeyReleased(const ui::KeyEvent& event) override; |
| 93 void OnGestureEvent(ui::GestureEvent* event) override; | 93 void OnGestureEvent(ui::GestureEvent* event) override; |
| 94 bool AcceleratorPressed(const ui::Accelerator& accelerator) override; | 94 bool AcceleratorPressed(const ui::Accelerator& accelerator) override; |
| 95 void ShowContextMenu(const gfx::Point& p, | 95 void ShowContextMenu(const gfx::Point& p, |
| 96 ui::MenuSourceType source_type) override; | 96 ui::MenuSourceType source_type) override; |
| 97 void OnDragStarted(const ui::LocatedEvent& event) override; |
| 97 void OnDragDone() override; | 98 void OnDragDone() override; |
| 98 void GetAccessibleState(ui::AXViewState* state) override; | 99 void GetAccessibleState(ui::AXViewState* state) override; |
| 99 void VisibilityChanged(View* starting_from, bool is_visible) override; | 100 void VisibilityChanged(View* starting_from, bool is_visible) override; |
| 100 | 101 |
| 101 // Overridden from gfx::AnimationDelegate: | 102 // Overridden from gfx::AnimationDelegate: |
| 102 void AnimationProgressed(const gfx::Animation* animation) override; | 103 void AnimationProgressed(const gfx::Animation* animation) override; |
| 103 | 104 |
| 104 protected: | 105 protected: |
| 105 // Construct the Button with a Listener. See comment for Button's ctor. | 106 // Construct the Button with a Listener. See comment for Button's ctor. |
| 106 explicit CustomButton(ButtonListener* listener); | 107 explicit CustomButton(ButtonListener* listener); |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 | 167 |
| 167 // The event on which the button should notify its listener. | 168 // The event on which the button should notify its listener. |
| 168 NotifyAction notify_action_; | 169 NotifyAction notify_action_; |
| 169 | 170 |
| 170 DISALLOW_COPY_AND_ASSIGN(CustomButton); | 171 DISALLOW_COPY_AND_ASSIGN(CustomButton); |
| 171 }; | 172 }; |
| 172 | 173 |
| 173 } // namespace views | 174 } // namespace views |
| 174 | 175 |
| 175 #endif // UI_VIEWS_CONTROLS_BUTTON_CUSTOM_BUTTON_H_ | 176 #endif // UI_VIEWS_CONTROLS_BUTTON_CUSTOM_BUTTON_H_ |
| OLD | NEW |