| 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.annotation.SuppressLint; | 7 import android.annotation.SuppressLint; |
| 8 import android.annotation.TargetApi; | 8 import android.annotation.TargetApi; |
| 9 import android.app.assist.AssistStructure.ViewNode; | 9 import android.app.assist.AssistStructure.ViewNode; |
| 10 import android.content.ClipData; | 10 import android.content.ClipData; |
| (...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 276 private final Context mContext; | 276 private final Context mContext; |
| 277 private final String mProductVersion; | 277 private final String mProductVersion; |
| 278 private ViewGroup mContainerView; | 278 private ViewGroup mContainerView; |
| 279 private InternalAccessDelegate mContainerViewInternals; | 279 private InternalAccessDelegate mContainerViewInternals; |
| 280 private WebContents mWebContents; | 280 private WebContents mWebContents; |
| 281 private WebContentsObserver mWebContentsObserver; | 281 private WebContentsObserver mWebContentsObserver; |
| 282 | 282 |
| 283 private ContentViewClient mContentViewClient; | 283 private ContentViewClient mContentViewClient; |
| 284 | 284 |
| 285 // Native pointer to C++ ContentViewCoreImpl object which will be set by nat
iveInit(). | 285 // Native pointer to C++ ContentViewCoreImpl object which will be set by nat
iveInit(). |
| 286 private long mNativeContentViewCore = 0; | 286 private long mNativeContentViewCore; |
| 287 | 287 |
| 288 private boolean mAttachedToWindow; | 288 private boolean mAttachedToWindow; |
| 289 private final ObserverList<GestureStateListener> mGestureStateListeners; | 289 private final ObserverList<GestureStateListener> mGestureStateListeners; |
| 290 private final RewindableIterator<GestureStateListener> mGestureStateListener
sIterator; | 290 private final RewindableIterator<GestureStateListener> mGestureStateListener
sIterator; |
| 291 | 291 |
| 292 private PopupZoomer mPopupZoomer; | 292 private PopupZoomer mPopupZoomer; |
| 293 private SelectPopup mSelectPopup; | 293 private SelectPopup mSelectPopup; |
| 294 private long mNativeSelectPopupSourceFrame = 0; | 294 private long mNativeSelectPopupSourceFrame; |
| 295 | 295 |
| 296 private OverscrollRefreshHandler mOverscrollRefreshHandler; | 296 private OverscrollRefreshHandler mOverscrollRefreshHandler; |
| 297 | 297 |
| 298 private Runnable mFakeMouseMoveRunnable = null; | 298 private Runnable mFakeMouseMoveRunnable; |
| 299 | 299 |
| 300 // Only valid when focused on a text / password field. | 300 // Only valid when focused on a text / password field. |
| 301 private ImeAdapter mImeAdapter; | 301 private ImeAdapter mImeAdapter; |
| 302 | 302 |
| 303 // Size of the viewport in physical pixels as set from onSizeChanged. | 303 // Size of the viewport in physical pixels as set from onSizeChanged. |
| 304 private int mViewportWidthPix; | 304 private int mViewportWidthPix; |
| 305 private int mViewportHeightPix; | 305 private int mViewportHeightPix; |
| 306 private int mPhysicalBackingWidthPix; | 306 private int mPhysicalBackingWidthPix; |
| 307 private int mPhysicalBackingHeightPix; | 307 private int mPhysicalBackingHeightPix; |
| 308 private int mTopControlsHeightPix; | 308 private int mTopControlsHeightPix; |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 358 | 358 |
| 359 // Whether a touch scroll sequence is active, used to hide text selection | 359 // Whether a touch scroll sequence is active, used to hide text selection |
| 360 // handles. Note that a scroll sequence will *always* bound a pinch | 360 // handles. Note that a scroll sequence will *always* bound a pinch |
| 361 // sequence, so this will also be true for the duration of a pinch gesture. | 361 // sequence, so this will also be true for the duration of a pinch gesture. |
| 362 private boolean mTouchScrollInProgress; | 362 private boolean mTouchScrollInProgress; |
| 363 | 363 |
| 364 // The outstanding fling start events that hasn't got fling end yet. It may
be > 1 because | 364 // The outstanding fling start events that hasn't got fling end yet. It may
be > 1 because |
| 365 // onNativeFlingStopped() is called asynchronously. | 365 // onNativeFlingStopped() is called asynchronously. |
| 366 private int mPotentiallyActiveFlingCount; | 366 private int mPotentiallyActiveFlingCount; |
| 367 | 367 |
| 368 private SmartClipDataListener mSmartClipDataListener = null; | 368 private SmartClipDataListener mSmartClipDataListener; |
| 369 | 369 |
| 370 /** | 370 /** |
| 371 * PID used to indicate an invalid render process. | 371 * PID used to indicate an invalid render process. |
| 372 */ | 372 */ |
| 373 // Keep in sync with the value returned from ContentViewCoreImpl::GetCurrent
RendererProcessId() | 373 // Keep in sync with the value returned from ContentViewCoreImpl::GetCurrent
RendererProcessId() |
| 374 // if there is no render process. | 374 // if there is no render process. |
| 375 public static final int INVALID_RENDER_PROCESS_PID = 0; | 375 public static final int INVALID_RENDER_PROCESS_PID = 0; |
| 376 | 376 |
| 377 // Offsets for the events that passes through this ContentViewCore. | 377 // Offsets for the events that passes through this ContentViewCore. |
| 378 private float mCurrentTouchOffsetX; | 378 private float mCurrentTouchOffsetX; |
| (...skipping 2600 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2979 String textTrackTextShadow, String textTrackTextSize); | 2979 String textTrackTextShadow, String textTrackTextSize); |
| 2980 | 2980 |
| 2981 private native void nativeExtractSmartClipData(long nativeContentViewCoreImp
l, | 2981 private native void nativeExtractSmartClipData(long nativeContentViewCoreImp
l, |
| 2982 int x, int y, int w, int h); | 2982 int x, int y, int w, int h); |
| 2983 | 2983 |
| 2984 private native void nativeSetBackgroundOpaque(long nativeContentViewCoreImpl
, boolean opaque); | 2984 private native void nativeSetBackgroundOpaque(long nativeContentViewCoreImpl
, boolean opaque); |
| 2985 private native boolean nativeIsTouchDragDropEnabled(long nativeContentViewCo
reImpl); | 2985 private native boolean nativeIsTouchDragDropEnabled(long nativeContentViewCo
reImpl); |
| 2986 private native void nativeOnDragEvent(long nativeContentViewCoreImpl, int ac
tion, int x, int y, | 2986 private native void nativeOnDragEvent(long nativeContentViewCoreImpl, int ac
tion, int x, int y, |
| 2987 int screenX, int screenY, String[] mimeTypes, String content); | 2987 int screenX, int screenY, String[] mimeTypes, String content); |
| 2988 } | 2988 } |
| OLD | NEW |