Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(27)

Side by Side Diff: ui/touch_selection/touch_handle.h

Issue 698253004: Reland: Implement Aura side of unified touch text selection for contents (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed overrides in TouchHandleDrawableAura Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_TOUCH_SELECTION_TOUCH_HANDLE_H_ 5 #ifndef UI_TOUCH_SELECTION_TOUCH_HANDLE_H_
6 #define UI_TOUCH_SELECTION_TOUCH_HANDLE_H_ 6 #define UI_TOUCH_SELECTION_TOUCH_HANDLE_H_
7 7
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/time/time.h" 10 #include "base/time/time.h"
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 88
89 // Ticks an active animation, as requested to the client by |SetNeedsAnimate|. 89 // Ticks an active animation, as requested to the client by |SetNeedsAnimate|.
90 // Returns true if an animation is active and requires further ticking. 90 // Returns true if an animation is active and requires further ticking.
91 bool Animate(base::TimeTicks frame_time); 91 bool Animate(base::TimeTicks frame_time);
92 92
93 bool is_dragging() const { return is_dragging_; } 93 bool is_dragging() const { return is_dragging_; }
94 const gfx::PointF& position() const { return position_; } 94 const gfx::PointF& position() const { return position_; }
95 TouchHandleOrientation orientation() const { return orientation_; } 95 TouchHandleOrientation orientation() const { return orientation_; }
96 96
97 private: 97 private:
98 friend class TouchSelectionControllerAuraTest;
jdduke (slow) 2015/01/28 16:35:32 Hmm, this friend declaration is a shame, I guess t
mohsen 2015/02/22 23:23:09 Fixed, please take another look.
99
98 void BeginDrag(); 100 void BeginDrag();
99 void EndDrag(); 101 void EndDrag();
100 void BeginFade(); 102 void BeginFade();
101 void EndFade(); 103 void EndFade();
102 void SetAlpha(float alpha); 104 void SetAlpha(float alpha);
103 105
106 TouchHandleDrawable* drawable_for_testing() const { return drawable_.get(); }
107
104 scoped_ptr<TouchHandleDrawable> drawable_; 108 scoped_ptr<TouchHandleDrawable> drawable_;
105 109
106 TouchHandleClient* const client_; 110 TouchHandleClient* const client_;
107 111
108 gfx::PointF position_; 112 gfx::PointF position_;
109 TouchHandleOrientation orientation_; 113 TouchHandleOrientation orientation_;
110 TouchHandleOrientation deferred_orientation_; 114 TouchHandleOrientation deferred_orientation_;
111 115
112 gfx::PointF touch_down_position_; 116 gfx::PointF touch_down_position_;
113 gfx::Vector2dF touch_to_focus_offset_; 117 gfx::Vector2dF touch_to_focus_offset_;
(...skipping 11 matching lines...) Expand all
125 bool is_visible_; 129 bool is_visible_;
126 bool is_dragging_; 130 bool is_dragging_;
127 bool is_drag_within_tap_region_; 131 bool is_drag_within_tap_region_;
128 132
129 DISALLOW_COPY_AND_ASSIGN(TouchHandle); 133 DISALLOW_COPY_AND_ASSIGN(TouchHandle);
130 }; 134 };
131 135
132 } // namespace ui 136 } // namespace ui
133 137
134 #endif // UI_TOUCH_SELECTION_TOUCH_HANDLE_H_ 138 #endif // UI_TOUCH_SELECTION_TOUCH_HANDLE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698