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

Side by Side Diff: content/browser/android/joystick_scroll_provider.h

Issue 2548363007: Emulate Android joystick scroll with synthetic mouse wheel event (Closed)
Patch Set: Fixed tests Created 4 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_BROWSER_ANDROID_JOYSTICK_SCROLL_PROVIDER_H_
6 #define CONTENT_BROWSER_ANDROID_JOYSTICK_SCROLL_PROVIDER_H_
7
8 #include "base/android/jni_android.h"
9 #include "base/android/jni_weak_ref.h"
10
11 namespace content {
12
13 class WebContentsImpl;
14
15 class JoystickScrollProvider {
16 public:
17 JoystickScrollProvider(JNIEnv* env,
18 const base::android::JavaRef<jobject>& obj,
19 WebContentsImpl* web_contents);
20
21 ~JoystickScrollProvider();
22
23 void ScrollBy(JNIEnv* env,
24 const base::android::JavaParamRef<jobject>& obj,
25 jlong time_ms,
26 jfloat dx_dip,
27 jfloat dy_dip);
28
29 private:
30 class UserData;
31
32 // A weak reference to the Java JoystickScrollProvider object.
33 JavaObjectWeakGlobalRef java_ref_;
34
35 WebContentsImpl* web_contents_;
36
37 DISALLOW_COPY_AND_ASSIGN(JoystickScrollProvider);
38 };
39
40 bool RegisterJoystickScrollProvider(JNIEnv* env);
41
42 } // namespace content
43
44 #endif // CONTENT_BROWSER_ANDROID_JOYSTICK_SCROLL_PROVIDER_H_
OLDNEW
« no previous file with comments | « content/browser/android/browser_jni_registrar.cc ('k') | content/browser/android/joystick_scroll_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698