OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 CONTENT_BROWSER_WEB_CONTENTS_TOUCH_EDITABLE_IMPL_AURA_H_ | 5 #ifndef CONTENT_BROWSER_WEB_CONTENTS_TOUCH_EDITABLE_IMPL_AURA_H_ |
6 #define CONTENT_BROWSER_WEB_CONTENTS_TOUCH_EDITABLE_IMPL_AURA_H_ | 6 #define CONTENT_BROWSER_WEB_CONTENTS_TOUCH_EDITABLE_IMPL_AURA_H_ |
7 | 7 |
8 #include <deque> | 8 #include <deque> |
9 #include <map> | 9 #include <map> |
10 #include <queue> | 10 #include <queue> |
(...skipping 24 matching lines...) Expand all Loading... |
35 void AttachToView(RenderWidgetHostViewAura* view); | 35 void AttachToView(RenderWidgetHostViewAura* view); |
36 | 36 |
37 // Updates the |touch_selection_controller_| or ends touch editing session | 37 // Updates the |touch_selection_controller_| or ends touch editing session |
38 // depending on the current selection and cursor state. | 38 // depending on the current selection and cursor state. |
39 void UpdateEditingController(); | 39 void UpdateEditingController(); |
40 | 40 |
41 void OverscrollStarted(); | 41 void OverscrollStarted(); |
42 void OverscrollCompleted(); | 42 void OverscrollCompleted(); |
43 | 43 |
44 // Overridden from RenderWidgetHostViewAura::TouchEditingClient. | 44 // Overridden from RenderWidgetHostViewAura::TouchEditingClient. |
45 virtual void StartTouchEditing() OVERRIDE; | 45 virtual void StartTouchEditing() override; |
46 virtual void EndTouchEditing(bool quick) OVERRIDE; | 46 virtual void EndTouchEditing(bool quick) override; |
47 virtual void OnSelectionOrCursorChanged(const gfx::Rect& anchor, | 47 virtual void OnSelectionOrCursorChanged(const gfx::Rect& anchor, |
48 const gfx::Rect& focus) OVERRIDE; | 48 const gfx::Rect& focus) override; |
49 virtual void OnTextInputTypeChanged(ui::TextInputType type) OVERRIDE; | 49 virtual void OnTextInputTypeChanged(ui::TextInputType type) override; |
50 virtual bool HandleInputEvent(const ui::Event* event) OVERRIDE; | 50 virtual bool HandleInputEvent(const ui::Event* event) override; |
51 virtual void GestureEventAck(int gesture_event_type) OVERRIDE; | 51 virtual void GestureEventAck(int gesture_event_type) override; |
52 virtual void DidStopFlinging() OVERRIDE; | 52 virtual void DidStopFlinging() override; |
53 virtual void OnViewDestroyed() OVERRIDE; | 53 virtual void OnViewDestroyed() override; |
54 | 54 |
55 // Overridden from ui::TouchEditable: | 55 // Overridden from ui::TouchEditable: |
56 virtual void SelectRect(const gfx::Point& start, | 56 virtual void SelectRect(const gfx::Point& start, |
57 const gfx::Point& end) OVERRIDE; | 57 const gfx::Point& end) override; |
58 virtual void MoveCaretTo(const gfx::Point& point) OVERRIDE; | 58 virtual void MoveCaretTo(const gfx::Point& point) override; |
59 virtual void GetSelectionEndPoints(gfx::Rect* p1, gfx::Rect* p2) OVERRIDE; | 59 virtual void GetSelectionEndPoints(gfx::Rect* p1, gfx::Rect* p2) override; |
60 virtual gfx::Rect GetBounds() OVERRIDE; | 60 virtual gfx::Rect GetBounds() override; |
61 virtual gfx::NativeView GetNativeView() const OVERRIDE; | 61 virtual gfx::NativeView GetNativeView() const override; |
62 virtual void ConvertPointToScreen(gfx::Point* point) OVERRIDE; | 62 virtual void ConvertPointToScreen(gfx::Point* point) override; |
63 virtual void ConvertPointFromScreen(gfx::Point* point) OVERRIDE; | 63 virtual void ConvertPointFromScreen(gfx::Point* point) override; |
64 virtual bool DrawsHandles() OVERRIDE; | 64 virtual bool DrawsHandles() override; |
65 virtual void OpenContextMenu(const gfx::Point& anchor) OVERRIDE; | 65 virtual void OpenContextMenu(const gfx::Point& anchor) override; |
66 virtual bool IsCommandIdChecked(int command_id) const OVERRIDE; | 66 virtual bool IsCommandIdChecked(int command_id) const override; |
67 virtual bool IsCommandIdEnabled(int command_id) const OVERRIDE; | 67 virtual bool IsCommandIdEnabled(int command_id) const override; |
68 virtual bool GetAcceleratorForCommandId( | 68 virtual bool GetAcceleratorForCommandId( |
69 int command_id, | 69 int command_id, |
70 ui::Accelerator* accelerator) OVERRIDE; | 70 ui::Accelerator* accelerator) override; |
71 virtual void ExecuteCommand(int command_id, int event_flags) OVERRIDE; | 71 virtual void ExecuteCommand(int command_id, int event_flags) override; |
72 virtual void DestroyTouchSelection() OVERRIDE; | 72 virtual void DestroyTouchSelection() override; |
73 | 73 |
74 protected: | 74 protected: |
75 TouchEditableImplAura(); | 75 TouchEditableImplAura(); |
76 | 76 |
77 private: | 77 private: |
78 friend class TouchEditableImplAuraTest; | 78 friend class TouchEditableImplAuraTest; |
79 | 79 |
80 // A convenience function that is called after scroll/fling/overscroll ends to | 80 // A convenience function that is called after scroll/fling/overscroll ends to |
81 // re-activate touch selection if necessary. | 81 // re-activate touch selection if necessary. |
82 void ScrollEnded(); | 82 void ScrollEnded(); |
(...skipping 24 matching lines...) Expand all Loading... |
107 // Used to track if a textfield was focused when the current tap gesture | 107 // Used to track if a textfield was focused when the current tap gesture |
108 // happened. | 108 // happened. |
109 bool textfield_was_focused_on_tap_; | 109 bool textfield_was_focused_on_tap_; |
110 | 110 |
111 DISALLOW_COPY_AND_ASSIGN(TouchEditableImplAura); | 111 DISALLOW_COPY_AND_ASSIGN(TouchEditableImplAura); |
112 }; | 112 }; |
113 | 113 |
114 } // namespace content | 114 } // namespace content |
115 | 115 |
116 #endif // CONTENT_BROWSER_WEB_CONTENTS_TOUCH_EDITABLE_IMPL_AURA_H_ | 116 #endif // CONTENT_BROWSER_WEB_CONTENTS_TOUCH_EDITABLE_IMPL_AURA_H_ |
OLD | NEW |