| 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 <memory> |
| 9 |
| 8 #include "base/macros.h" | 10 #include "base/macros.h" |
| 9 #include "base/memory/scoped_ptr.h" | |
| 10 #include "ui/events/event_constants.h" | 11 #include "ui/events/event_constants.h" |
| 11 #include "ui/gfx/animation/animation_delegate.h" | 12 #include "ui/gfx/animation/animation_delegate.h" |
| 12 #include "ui/gfx/animation/throb_animation.h" | 13 #include "ui/gfx/animation/throb_animation.h" |
| 13 #include "ui/views/animation/ink_drop_state.h" | 14 #include "ui/views/animation/ink_drop_state.h" |
| 14 #include "ui/views/controls/button/button.h" | 15 #include "ui/views/controls/button/button.h" |
| 15 | 16 |
| 16 namespace views { | 17 namespace views { |
| 17 | 18 |
| 18 class InkDropDelegate; | 19 class InkDropDelegate; |
| 19 | 20 |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 bool OnKeyPressed(const ui::KeyEvent& event) override; | 94 bool OnKeyPressed(const ui::KeyEvent& event) override; |
| 94 bool OnKeyReleased(const ui::KeyEvent& event) override; | 95 bool OnKeyReleased(const ui::KeyEvent& event) override; |
| 95 void OnGestureEvent(ui::GestureEvent* event) override; | 96 void OnGestureEvent(ui::GestureEvent* event) override; |
| 96 bool AcceleratorPressed(const ui::Accelerator& accelerator) override; | 97 bool AcceleratorPressed(const ui::Accelerator& accelerator) override; |
| 97 bool SkipDefaultKeyEventProcessing(const ui::KeyEvent& event) override; | 98 bool SkipDefaultKeyEventProcessing(const ui::KeyEvent& event) override; |
| 98 void ShowContextMenu(const gfx::Point& p, | 99 void ShowContextMenu(const gfx::Point& p, |
| 99 ui::MenuSourceType source_type) override; | 100 ui::MenuSourceType source_type) override; |
| 100 void OnDragDone() override; | 101 void OnDragDone() override; |
| 101 void GetAccessibleState(ui::AXViewState* state) override; | 102 void GetAccessibleState(ui::AXViewState* state) override; |
| 102 void VisibilityChanged(View* starting_from, bool is_visible) override; | 103 void VisibilityChanged(View* starting_from, bool is_visible) override; |
| 103 scoped_ptr<InkDropHover> CreateInkDropHover() const override; | 104 std::unique_ptr<InkDropHover> CreateInkDropHover() const override; |
| 104 SkColor GetInkDropBaseColor() const override; | 105 SkColor GetInkDropBaseColor() const override; |
| 105 | 106 |
| 106 // Overridden from gfx::AnimationDelegate: | 107 // Overridden from gfx::AnimationDelegate: |
| 107 void AnimationProgressed(const gfx::Animation* animation) override; | 108 void AnimationProgressed(const gfx::Animation* animation) override; |
| 108 | 109 |
| 109 InkDropDelegate* ink_drop_delegate() const { return ink_drop_delegate_; } | 110 InkDropDelegate* ink_drop_delegate() const { return ink_drop_delegate_; } |
| 110 | 111 |
| 111 // Overridden from View: | 112 // Overridden from View: |
| 112 void Layout() override; | 113 void Layout() override; |
| 113 void ViewHierarchyChanged( | 114 void ViewHierarchyChanged( |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 203 // because it needs to paint to a layer so it can extend beyond the bounds of | 204 // because it needs to paint to a layer so it can extend beyond the bounds of |
| 204 // |this|. | 205 // |this|. |
| 205 views::View* md_focus_ring_; | 206 views::View* md_focus_ring_; |
| 206 | 207 |
| 207 DISALLOW_COPY_AND_ASSIGN(CustomButton); | 208 DISALLOW_COPY_AND_ASSIGN(CustomButton); |
| 208 }; | 209 }; |
| 209 | 210 |
| 210 } // namespace views | 211 } // namespace views |
| 211 | 212 |
| 212 #endif // UI_VIEWS_CONTROLS_BUTTON_CUSTOM_BUTTON_H_ | 213 #endif // UI_VIEWS_CONTROLS_BUTTON_CUSTOM_BUTTON_H_ |
| OLD | NEW |