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

Side by Side Diff: content/browser/renderer_host/input/synthetic_pointer_action.cc

Issue 2173073003: Move WebInputEvent into public/platform from public/web (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix gn build failure with android Created 4 years, 5 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 2015 The Chromium Authors. All rights reserved. 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 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 #include "content/browser/renderer_host/input/synthetic_pointer_action.h" 5 #include "content/browser/renderer_host/input/synthetic_pointer_action.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "third_party/WebKit/public/web/WebInputEvent.h" 8 #include "third_party/WebKit/public/web/WebInputEvent.h"
9 #include "ui/events/latency_info.h" 9 #include "ui/events/latency_info.h"
10 10
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 default: 58 default:
59 return POINTER_ACTION_INPUT_INVALID; 59 return POINTER_ACTION_INPUT_INVALID;
60 } 60 }
61 } 61 }
62 synthetic_pointer_->DispatchEvent(target, timestamp); 62 synthetic_pointer_->DispatchEvent(target, timestamp);
63 return GESTURE_FINISHED; 63 return GESTURE_FINISHED;
64 } 64 }
65 65
66 bool SyntheticPointerAction::UserInputCheck( 66 bool SyntheticPointerAction::UserInputCheck(
67 const SyntheticPointerActionParams& params) { 67 const SyntheticPointerActionParams& params) {
68 if (params.index() < 0 || params.index() >= WebTouchEvent::touchesLengthCap) 68 if (params.index() < 0 || params.index() >= WebTouchEvent::kTouchesLengthCap)
69 return false; 69 return false;
70 70
71 if (synthetic_pointer_->SourceType() != params.gesture_source_type) 71 if (synthetic_pointer_->SourceType() != params.gesture_source_type)
72 return false; 72 return false;
73 73
74 if (params.pointer_action_type() == 74 if (params.pointer_action_type() ==
75 SyntheticPointerActionParams::PointerActionType::PRESS && 75 SyntheticPointerActionParams::PointerActionType::PRESS &&
76 GetPointIndex(params.index()) >= 0) { 76 GetPointIndex(params.index()) >= 0) {
77 return false; 77 return false;
78 } 78 }
79 79
80 if ((params.pointer_action_type() == 80 if ((params.pointer_action_type() ==
81 SyntheticPointerActionParams::PointerActionType::MOVE || 81 SyntheticPointerActionParams::PointerActionType::MOVE ||
82 params.pointer_action_type() == 82 params.pointer_action_type() ==
83 SyntheticPointerActionParams::PointerActionType::RELEASE) && 83 SyntheticPointerActionParams::PointerActionType::RELEASE) &&
84 GetPointIndex(params.index()) < 0) { 84 GetPointIndex(params.index()) < 0) {
85 return false; 85 return false;
86 } 86 }
87 return true; 87 return true;
88 } 88 }
89 89
90 } // namespace content 90 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698