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

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: 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 #include "content/public/browser/web_contents_observer.h"
boliu 2016/12/07 06:06:43 not needed?
Tima Vaisburd 2016/12/08 00:35:47 Removed
11
12 namespace content {
13
14 class WebContents;
15 class WebContentsImpl;
16
17 class JoystickScrollProvider {
18 public:
19 JoystickScrollProvider(JNIEnv* env,
20 const base::android::JavaRef<jobject>& obj,
21 WebContents* web_contents);
boliu 2016/12/07 06:06:43 use the impl type, then remove the extra forward d
Tima Vaisburd 2016/12/08 00:35:47 Done.
22
23 ~JoystickScrollProvider();
24
25 void ScrollBy(JNIEnv* env,
26 const base::android::JavaParamRef<jobject>& obj,
27 jlong time_ms,
28 jfloat dx_dip,
29 jfloat dy_dip);
30
31 private:
32 class UserData;
33
34 // A weak reference to the Java JoystickScrollProvider object.
35 JavaObjectWeakGlobalRef java_ref_;
36
37 WebContentsImpl* web_contents_;
38
39 DISALLOW_COPY_AND_ASSIGN(JoystickScrollProvider);
40 };
41
42 bool RegisterJoystickScrollProvider(JNIEnv* env);
43
44 } // namespace content
45
46 #endif // CONTENT_BROWSER_ANDROID_JOYSTICK_SCROLL_PROVIDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698