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

Side by Side Diff: content/browser/renderer_host/input/synthetic_gesture_target_android.h

Issue 293683002: Synthetic pinch gesture take scale factor as parameter. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comments Created 6 years, 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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_RENDERER_HOST_INPUT_SYNTHETIC_GESTURE_TARGET_ANDROID_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_GESTURE_TARGET_ANDROID_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_GESTURE_TARGET_ANDROID_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_GESTURE_TARGET_ANDROID_H_
7 7
8 #include "base/android/jni_android.h" 8 #include "base/android/jni_android.h"
9 #include "base/time/time.h" 9 #include "base/time/time.h"
10 #include "content/browser/renderer_host/input/synthetic_gesture_target_base.h" 10 #include "content/browser/renderer_host/input/synthetic_gesture_target_base.h"
(...skipping 19 matching lines...) Expand all
30 const blink::WebMouseWheelEvent& web_wheel, 30 const blink::WebMouseWheelEvent& web_wheel,
31 const ui::LatencyInfo& latency_info) OVERRIDE; 31 const ui::LatencyInfo& latency_info) OVERRIDE;
32 virtual void DispatchWebMouseEventToPlatform( 32 virtual void DispatchWebMouseEventToPlatform(
33 const blink::WebMouseEvent& web_mouse, 33 const blink::WebMouseEvent& web_mouse,
34 const ui::LatencyInfo& latency_info) OVERRIDE; 34 const ui::LatencyInfo& latency_info) OVERRIDE;
35 35
36 // SyntheticGestureTarget: 36 // SyntheticGestureTarget:
37 virtual SyntheticGestureParams::GestureSourceType 37 virtual SyntheticGestureParams::GestureSourceType
38 GetDefaultSyntheticGestureSourceType() const OVERRIDE; 38 GetDefaultSyntheticGestureSourceType() const OVERRIDE;
39 39
40 virtual int GetTouchSlopInDips() const OVERRIDE; 40 virtual float GetTouchSlopInDips() const OVERRIDE;
41
42 virtual float GetMinScalingSpanInDips() const OVERRIDE;
41 43
42 private: 44 private:
43 // Enum values below need to be kept in sync with TouchEventSynthesizer.java 45 // Enum values below need to be kept in sync with TouchEventSynthesizer.java
44 enum Action { 46 enum Action {
45 ActionInvalid = -1, 47 ActionInvalid = -1,
46 ActionStart = 0, 48 ActionStart = 0,
47 ActionMove = 1, 49 ActionMove = 1,
48 ActionCancel = 2, 50 ActionCancel = 2,
49 ActionEnd = 3 51 ActionEnd = 3
50 }; 52 };
51 53
52 void TouchSetPointer(JNIEnv* env, int index, int x, int y, int id); 54 void TouchSetPointer(JNIEnv* env, int index, int x, int y, int id);
53 void TouchInject( 55 void TouchInject(
54 JNIEnv* env, Action action, int pointer_count, int64 time_in_ms); 56 JNIEnv* env, Action action, int pointer_count, int64 time_in_ms);
55 57
56 base::android::ScopedJavaGlobalRef<jobject> touch_event_synthesizer_; 58 base::android::ScopedJavaGlobalRef<jobject> touch_event_synthesizer_;
57 59
58 DISALLOW_COPY_AND_ASSIGN(SyntheticGestureTargetAndroid); 60 DISALLOW_COPY_AND_ASSIGN(SyntheticGestureTargetAndroid);
59 }; 61 };
60 62
61 } // namespace content 63 } // namespace content
62 64
63 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_GESTURE_TARGET_ANDROID_ H_ 65 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_GESTURE_TARGET_ANDROID_ H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698