| OLD | NEW |
| 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 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 } | 184 } |
| 185 | 185 |
| 186 /** | 186 /** |
| 187 * Currently the ContentView scrolling happens in the native side. In | 187 * Currently the ContentView scrolling happens in the native side. In |
| 188 * the Java view system, it is always pinned at (0, 0). scrollBy() and scrol
lTo() | 188 * the Java view system, it is always pinned at (0, 0). scrollBy() and scrol
lTo() |
| 189 * are overridden, so that View's mScrollX and mScrollY will be unchanged at | 189 * are overridden, so that View's mScrollX and mScrollY will be unchanged at |
| 190 * (0, 0). This is critical for drawing ContentView correctly. | 190 * (0, 0). This is critical for drawing ContentView correctly. |
| 191 */ | 191 */ |
| 192 @Override | 192 @Override |
| 193 public void scrollBy(int x, int y) { | 193 public void scrollBy(int x, int y) { |
| 194 mContentViewCore.scrollBy(x, y, false); | 194 mContentViewCore.scrollBy(x, y); |
| 195 } | 195 } |
| 196 | 196 |
| 197 @Override | 197 @Override |
| 198 public void scrollTo(int x, int y) { | 198 public void scrollTo(int x, int y) { |
| 199 mContentViewCore.scrollTo(x, y); | 199 mContentViewCore.scrollTo(x, y); |
| 200 } | 200 } |
| 201 | 201 |
| 202 @Override | 202 @Override |
| 203 protected int computeHorizontalScrollExtent() { | 203 protected int computeHorizontalScrollExtent() { |
| 204 // TODO(dtrainor): Need to expose scroll events properly to public. Eith
er make getScroll* | 204 // TODO(dtrainor): Need to expose scroll events properly to public. Eith
er make getScroll* |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 350 public ContentViewApi23(Context context, ContentViewCore cvc) { | 350 public ContentViewApi23(Context context, ContentViewCore cvc) { |
| 351 super(context, cvc); | 351 super(context, cvc); |
| 352 } | 352 } |
| 353 | 353 |
| 354 @Override | 354 @Override |
| 355 public void onProvideVirtualStructure(final ViewStructure structure) { | 355 public void onProvideVirtualStructure(final ViewStructure structure) { |
| 356 mContentViewCore.onProvideVirtualStructure(structure, false); | 356 mContentViewCore.onProvideVirtualStructure(structure, false); |
| 357 } | 357 } |
| 358 } | 358 } |
| 359 } | 359 } |
| OLD | NEW |