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

Side by Side Diff: content/public/android/java/src/org/chromium/content/browser/ContentView.java

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
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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 package org.chromium.content.browser; 5 package org.chromium.content.browser;
6 6
7 import android.content.Context; 7 import android.content.Context;
8 import android.content.res.Configuration; 8 import android.content.res.Configuration;
9 import android.graphics.Rect; 9 import android.graphics.Rect;
10 import android.os.Build; 10 import android.os.Build;
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 } 217 }
218 218
219 /** 219 /**
220 * Currently the ContentView scrolling happens in the native side. In 220 * Currently the ContentView scrolling happens in the native side. In
221 * the Java view system, it is always pinned at (0, 0). scrollBy() and scrol lTo() 221 * the Java view system, it is always pinned at (0, 0). scrollBy() and scrol lTo()
222 * are overridden, so that View's mScrollX and mScrollY will be unchanged at 222 * are overridden, so that View's mScrollX and mScrollY will be unchanged at
223 * (0, 0). This is critical for drawing ContentView correctly. 223 * (0, 0). This is critical for drawing ContentView correctly.
224 */ 224 */
225 @Override 225 @Override
226 public void scrollBy(int x, int y) { 226 public void scrollBy(int x, int y) {
227 mContentViewCore.scrollBy(x, y, false); 227 mContentViewCore.scrollBy(x, y);
228 } 228 }
229 229
230 @Override 230 @Override
231 public void scrollTo(int x, int y) { 231 public void scrollTo(int x, int y) {
232 mContentViewCore.scrollTo(x, y); 232 mContentViewCore.scrollTo(x, y);
233 } 233 }
234 234
235 @Override 235 @Override
236 protected int computeHorizontalScrollExtent() { 236 protected int computeHorizontalScrollExtent() {
237 // TODO(dtrainor): Need to expose scroll events properly to public. Eith er make getScroll* 237 // TODO(dtrainor): Need to expose scroll events properly to public. Eith er make getScroll*
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 public ContentViewApi23(Context context, ContentViewCore cvc) { 364 public ContentViewApi23(Context context, ContentViewCore cvc) {
365 super(context, cvc); 365 super(context, cvc);
366 } 366 }
367 367
368 @Override 368 @Override
369 public void onProvideVirtualStructure(final ViewStructure structure) { 369 public void onProvideVirtualStructure(final ViewStructure structure) {
370 mContentViewCore.onProvideVirtualStructure(structure, false); 370 mContentViewCore.onProvideVirtualStructure(structure, false);
371 } 371 }
372 } 372 }
373 } 373 }
OLDNEW
« no previous file with comments | « content/public/android/BUILD.gn ('k') | content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698