| 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/base/animation/animation_delegate.h" | 9 #include "ui/base/animation/animation_delegate.h" |
| 10 #include "ui/base/events/event_constants.h" | 10 #include "ui/base/events/event_constants.h" |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 virtual void OnMouseReleased(const ui::MouseEvent& event) OVERRIDE; | 77 virtual void OnMouseReleased(const ui::MouseEvent& event) OVERRIDE; |
| 78 virtual void OnMouseCaptureLost() OVERRIDE; | 78 virtual void OnMouseCaptureLost() OVERRIDE; |
| 79 virtual void OnMouseEntered(const ui::MouseEvent& event) OVERRIDE; | 79 virtual void OnMouseEntered(const ui::MouseEvent& event) OVERRIDE; |
| 80 virtual void OnMouseExited(const ui::MouseEvent& event) OVERRIDE; | 80 virtual void OnMouseExited(const ui::MouseEvent& event) OVERRIDE; |
| 81 virtual void OnMouseMoved(const ui::MouseEvent& event) OVERRIDE; | 81 virtual void OnMouseMoved(const ui::MouseEvent& event) OVERRIDE; |
| 82 virtual bool OnKeyPressed(const ui::KeyEvent& event) OVERRIDE; | 82 virtual bool OnKeyPressed(const ui::KeyEvent& event) OVERRIDE; |
| 83 virtual bool OnKeyReleased(const ui::KeyEvent& event) OVERRIDE; | 83 virtual bool OnKeyReleased(const ui::KeyEvent& event) OVERRIDE; |
| 84 virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE; | 84 virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE; |
| 85 virtual bool AcceleratorPressed(const ui::Accelerator& accelerator) OVERRIDE; | 85 virtual bool AcceleratorPressed(const ui::Accelerator& accelerator) OVERRIDE; |
| 86 virtual void ShowContextMenu(const gfx::Point& p, | 86 virtual void ShowContextMenu(const gfx::Point& p, |
| 87 bool is_mouse_gesture) OVERRIDE; | 87 ui::ContextMenuSourceType source_type) OVERRIDE; |
| 88 virtual void OnDragDone() OVERRIDE; | 88 virtual void OnDragDone() OVERRIDE; |
| 89 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE; | 89 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE; |
| 90 virtual void VisibilityChanged(View* starting_from, bool is_visible) OVERRIDE; | 90 virtual void VisibilityChanged(View* starting_from, bool is_visible) OVERRIDE; |
| 91 | 91 |
| 92 // Overridden from ui::AnimationDelegate: | 92 // Overridden from ui::AnimationDelegate: |
| 93 virtual void AnimationProgressed(const ui::Animation* animation) OVERRIDE; | 93 virtual void AnimationProgressed(const ui::Animation* animation) OVERRIDE; |
| 94 | 94 |
| 95 // Takes ownership of the delegate. | 95 // Takes ownership of the delegate. |
| 96 void set_state_changed_delegate(CustomButtonStateChangedDelegate* delegate) { | 96 void set_state_changed_delegate(CustomButtonStateChangedDelegate* delegate) { |
| 97 state_changed_delegate_.reset(delegate); | 97 state_changed_delegate_.reset(delegate); |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 protected: | 154 protected: |
| 155 CustomButtonStateChangedDelegate() {} | 155 CustomButtonStateChangedDelegate() {} |
| 156 | 156 |
| 157 private: | 157 private: |
| 158 DISALLOW_COPY_AND_ASSIGN(CustomButtonStateChangedDelegate); | 158 DISALLOW_COPY_AND_ASSIGN(CustomButtonStateChangedDelegate); |
| 159 }; | 159 }; |
| 160 | 160 |
| 161 } // namespace views | 161 } // namespace views |
| 162 | 162 |
| 163 #endif // UI_VIEWS_CONTROLS_BUTTON_CUSTOM_BUTTON_H_ | 163 #endif // UI_VIEWS_CONTROLS_BUTTON_CUSTOM_BUTTON_H_ |
| OLD | NEW |