| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef UI_TOUCH_SELECTION_TOUCH_SELECTION_CONTROLLER_AURA_H_ |
| 6 #define UI_TOUCH_SELECTION_TOUCH_SELECTION_CONTROLLER_AURA_H_ |
| 7 |
| 8 #include "base/timer/timer.h" |
| 9 #include "ui/events/event_handler.h" |
| 10 #include "ui/events/event_target.h" |
| 11 #include "ui/touch_selection/touch_selection_controller_impl.h" |
| 12 |
| 13 namespace aura { |
| 14 class Window; |
| 15 } |
| 16 |
| 17 namespace ui { |
| 18 class MotionEventAura; |
| 19 class TouchEvent; |
| 20 class TouchSelectionControllerAuraTestApi; |
| 21 |
| 22 // Aura implementation of |TouchSelectionController|. |
| 23 class UI_TOUCH_SELECTION_EXPORT TouchSelectionControllerAura |
| 24 : public TouchSelectionControllerImpl, |
| 25 public EventHandler { |
| 26 public: |
| 27 TouchSelectionControllerAura( |
| 28 TouchSelectionControllerClient* client, |
| 29 base::TimeDelta tap_timeout, |
| 30 float tap_slop, |
| 31 bool show_on_tap_for_empty_editable); |
| 32 |
| 33 ~TouchSelectionControllerAura() override; |
| 34 |
| 35 // TouchSelectionController: |
| 36 bool OnSelectionBoundsUpdated(const SelectionBound& start, |
| 37 const SelectionBound& end) override; |
| 38 bool WillHandleTouchEvent(const MotionEvent& event) override; |
| 39 void OnTapEvent() override; |
| 40 void OnLongPressEvent() override; |
| 41 void AllowShowingFromCurrentSelection() override; |
| 42 void HideAndDisallowShowingAutomatically() override; |
| 43 void SetTemporarilyHidden(bool hidden) override; |
| 44 void OnSelectionEditable(bool editable) override; |
| 45 void OnSelectionEmpty(bool empty) override; |
| 46 bool Animate(base::TimeTicks animate_time) override; |
| 47 void OnNativeViewMoved() override; |
| 48 void OnOverscrollStarted() override; |
| 49 void OnOverscrollCompleted() override; |
| 50 void OnFlingCompleted() override; |
| 51 |
| 52 private: |
| 53 friend class TouchSelectionControllerAuraTestApi; |
| 54 class EnvPreTargetHandler; |
| 55 |
| 56 // TouchSelectionControllerImpl: |
| 57 void ActivateInsertion(); |
| 58 void DeactivateInsertion(); |
| 59 void ActivateSelection(); |
| 60 void DeactivateSelection(); |
| 61 |
| 62 // EventHandler: |
| 63 void OnTouchEvent(TouchEvent* event) override; |
| 64 void OnGestureEvent(GestureEvent* event) override; |
| 65 |
| 66 scoped_ptr<MotionEventAura> motion_event_; |
| 67 scoped_ptr<EnvPreTargetHandler> env_pre_target_handler_; |
| 68 |
| 69 TouchSelectionControllerAuraTestApi* test_api_; |
| 70 |
| 71 DISALLOW_COPY_AND_ASSIGN(TouchSelectionControllerAura); |
| 72 }; |
| 73 |
| 74 } // namespace ui |
| 75 |
| 76 #endif // UI_TOUCH_SELECTION_TOUCH_SELECTION_CONTROLLER_AURA_H_ |
| OLD | NEW |