| 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.app.Activity; | 8 import android.app.Activity; |
| 9 import android.app.SearchManager; | 9 import android.app.SearchManager; |
| 10 import android.content.ClipboardManager; | 10 import android.content.ClipboardManager; |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 214 * extractSmartClipData are available. | 214 * extractSmartClipData are available. |
| 215 */ | 215 */ |
| 216 public interface SmartClipDataListener { | 216 public interface SmartClipDataListener { |
| 217 public void onSmartClipDataExtracted(String text, String html, Rect clip
Rect); | 217 public void onSmartClipDataExtracted(String text, String html, Rect clip
Rect); |
| 218 } | 218 } |
| 219 | 219 |
| 220 private final Context mContext; | 220 private final Context mContext; |
| 221 private ViewGroup mContainerView; | 221 private ViewGroup mContainerView; |
| 222 private InternalAccessDelegate mContainerViewInternals; | 222 private InternalAccessDelegate mContainerViewInternals; |
| 223 private WebContents mWebContents; | 223 private WebContents mWebContents; |
| 224 private WebContentsObserverAndroid mWebContentsObserver; | 224 private WebContentsObserver mWebContentsObserver; |
| 225 | 225 |
| 226 private ContentViewClient mContentViewClient; | 226 private ContentViewClient mContentViewClient; |
| 227 | 227 |
| 228 private ContentSettings mContentSettings; | 228 private ContentSettings mContentSettings; |
| 229 | 229 |
| 230 // Native pointer to C++ ContentViewCoreImpl object which will be set by nat
iveInit(). | 230 // Native pointer to C++ ContentViewCoreImpl object which will be set by nat
iveInit(). |
| 231 private long mNativeContentViewCore = 0; | 231 private long mNativeContentViewCore = 0; |
| 232 | 232 |
| 233 private final ObserverList<GestureStateListener> mGestureStateListeners; | 233 private final ObserverList<GestureStateListener> mGestureStateListeners; |
| 234 private final RewindableIterator<GestureStateListener> mGestureStateListener
sIterator; | 234 private final RewindableIterator<GestureStateListener> mGestureStateListener
sIterator; |
| (...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 618 mWebContents = nativeGetWebContentsAndroid(mNativeContentViewCore); | 618 mWebContents = nativeGetWebContentsAndroid(mNativeContentViewCore); |
| 619 mContentSettings = new ContentSettings(this, mNativeContentViewCore); | 619 mContentSettings = new ContentSettings(this, mNativeContentViewCore); |
| 620 | 620 |
| 621 setContainerViewInternals(internalDispatcher); | 621 setContainerViewInternals(internalDispatcher); |
| 622 mRenderCoordinates.reset(); | 622 mRenderCoordinates.reset(); |
| 623 initPopupZoomer(mContext); | 623 initPopupZoomer(mContext); |
| 624 mImeAdapter = createImeAdapter(mContext); | 624 mImeAdapter = createImeAdapter(mContext); |
| 625 | 625 |
| 626 mAccessibilityInjector = AccessibilityInjector.newInstance(this); | 626 mAccessibilityInjector = AccessibilityInjector.newInstance(this); |
| 627 | 627 |
| 628 mWebContentsObserver = new WebContentsObserverAndroid(mWebContents) { | 628 mWebContentsObserver = new WebContentsObserver(mWebContents) { |
| 629 @Override | 629 @Override |
| 630 public void didNavigateMainFrame(String url, String baseUrl, | 630 public void didNavigateMainFrame(String url, String baseUrl, |
| 631 boolean isNavigationToDifferentPage, boolean isFragmentNavig
ation) { | 631 boolean isNavigationToDifferentPage, boolean isFragmentNavig
ation) { |
| 632 if (!isNavigationToDifferentPage) return; | 632 if (!isNavigationToDifferentPage) return; |
| 633 hidePopupsAndClearSelection(); | 633 hidePopupsAndClearSelection(); |
| 634 resetScrollInProgress(); | 634 resetScrollInProgress(); |
| 635 resetGestureDetection(); | 635 resetGestureDetection(); |
| 636 } | 636 } |
| 637 | 637 |
| 638 @Override | 638 @Override |
| (...skipping 2363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3002 private native void nativeWasResized(long nativeContentViewCoreImpl); | 3002 private native void nativeWasResized(long nativeContentViewCoreImpl); |
| 3003 | 3003 |
| 3004 private native void nativeSetAccessibilityEnabled( | 3004 private native void nativeSetAccessibilityEnabled( |
| 3005 long nativeContentViewCoreImpl, boolean enabled); | 3005 long nativeContentViewCoreImpl, boolean enabled); |
| 3006 | 3006 |
| 3007 private native void nativeExtractSmartClipData(long nativeContentViewCoreImp
l, | 3007 private native void nativeExtractSmartClipData(long nativeContentViewCoreImp
l, |
| 3008 int x, int y, int w, int h); | 3008 int x, int y, int w, int h); |
| 3009 | 3009 |
| 3010 private native void nativeSetBackgroundOpaque(long nativeContentViewCoreImpl
, boolean opaque); | 3010 private native void nativeSetBackgroundOpaque(long nativeContentViewCoreImpl
, boolean opaque); |
| 3011 } | 3011 } |
| OLD | NEW |