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

Unified Diff: ui/touch_selection/touch_handle.cc

Issue 759433002: Reland: Move TouchSelectionController from content to ui (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Excluded ui/touch_selection from Windows GN build Created 6 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/touch_selection/touch_handle.h ('k') | ui/touch_selection/touch_handle_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/touch_selection/touch_handle.cc
diff --git a/content/browser/renderer_host/input/touch_handle.cc b/ui/touch_selection/touch_handle.cc
similarity index 94%
rename from content/browser/renderer_host/input/touch_handle.cc
rename to ui/touch_selection/touch_handle.cc
index 2e247e6cdde9259cad4d185d4d44f06eaf0d1a98..91c28745d1296f019adbd8585834a16bbc737fee 100644
--- a/content/browser/renderer_host/input/touch_handle.cc
+++ b/ui/touch_selection/touch_handle.cc
@@ -2,11 +2,11 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "content/browser/renderer_host/input/touch_handle.h"
+#include "ui/touch_selection/touch_handle.h"
#include <cmath>
-namespace content {
+namespace ui {
namespace {
@@ -113,15 +113,15 @@ void TouchHandle::SetOrientation(TouchHandleOrientation orientation) {
drawable_->SetOrientation(orientation);
}
-bool TouchHandle::WillHandleTouchEvent(const ui::MotionEvent& event) {
+bool TouchHandle::WillHandleTouchEvent(const MotionEvent& event) {
if (!enabled_)
return false;
- if (!is_dragging_ && event.GetAction() != ui::MotionEvent::ACTION_DOWN)
+ if (!is_dragging_ && event.GetAction() != MotionEvent::ACTION_DOWN)
return false;
switch (event.GetAction()) {
- case ui::MotionEvent::ACTION_DOWN: {
+ case MotionEvent::ACTION_DOWN: {
if (!is_visible_)
return false;
const float touch_size = std::max(
@@ -139,7 +139,7 @@ bool TouchHandle::WillHandleTouchEvent(const ui::MotionEvent& event) {
BeginDrag();
} break;
- case ui::MotionEvent::ACTION_MOVE: {
+ case MotionEvent::ACTION_MOVE: {
gfx::PointF touch_move_position(event.GetX(), event.GetY());
if (is_drag_within_tap_region_) {
const float tap_slop = client_->GetTapSlop();
@@ -154,7 +154,7 @@ bool TouchHandle::WillHandleTouchEvent(const ui::MotionEvent& event) {
touch_move_position + touch_to_focus_offset_);
} break;
- case ui::MotionEvent::ACTION_UP: {
+ case MotionEvent::ACTION_UP: {
if (is_drag_within_tap_region_ &&
(event.GetEventTime() - touch_down_time_) <
client_->GetTapTimeout()) {
@@ -164,7 +164,7 @@ bool TouchHandle::WillHandleTouchEvent(const ui::MotionEvent& event) {
EndDrag();
} break;
- case ui::MotionEvent::ACTION_CANCEL:
+ case MotionEvent::ACTION_CANCEL:
EndDrag();
break;
@@ -261,4 +261,4 @@ void TouchHandle::SetAlpha(float alpha) {
drawable_->SetAlpha(alpha);
}
-} // namespace content
+} // namespace ui
« no previous file with comments | « ui/touch_selection/touch_handle.h ('k') | ui/touch_selection/touch_handle_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698