| 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 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 223 * extractSmartClipData are available. | 223 * extractSmartClipData are available. |
| 224 */ | 224 */ |
| 225 public interface SmartClipDataListener { | 225 public interface SmartClipDataListener { |
| 226 public void onSmartClipDataExtracted(String text, String html, Rect clip
Rect); | 226 public void onSmartClipDataExtracted(String text, String html, Rect clip
Rect); |
| 227 } | 227 } |
| 228 | 228 |
| 229 private final Context mContext; | 229 private final Context mContext; |
| 230 private ViewGroup mContainerView; | 230 private ViewGroup mContainerView; |
| 231 private InternalAccessDelegate mContainerViewInternals; | 231 private InternalAccessDelegate mContainerViewInternals; |
| 232 private WebContents mWebContents; | 232 private WebContents mWebContents; |
| 233 private WebContentsObserverAndroid mWebContentsObserver; | 233 private WebContentsObserver mWebContentsObserver; |
| 234 | 234 |
| 235 private ContentViewClient mContentViewClient; | 235 private ContentViewClient mContentViewClient; |
| 236 | 236 |
| 237 private ContentSettings mContentSettings; | 237 private ContentSettings mContentSettings; |
| 238 | 238 |
| 239 // Native pointer to C++ ContentViewCoreImpl object which will be set by nat
iveInit(). | 239 // Native pointer to C++ ContentViewCoreImpl object which will be set by nat
iveInit(). |
| 240 private long mNativeContentViewCore = 0; | 240 private long mNativeContentViewCore = 0; |
| 241 | 241 |
| 242 private final ObserverList<GestureStateListener> mGestureStateListeners; | 242 private final ObserverList<GestureStateListener> mGestureStateListeners; |
| 243 private final RewindableIterator<GestureStateListener> mGestureStateListener
sIterator; | 243 private final RewindableIterator<GestureStateListener> mGestureStateListener
sIterator; |
| (...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 621 mWebContents = nativeGetWebContentsAndroid(mNativeContentViewCore); | 621 mWebContents = nativeGetWebContentsAndroid(mNativeContentViewCore); |
| 622 mContentSettings = new ContentSettings(this, mNativeContentViewCore); | 622 mContentSettings = new ContentSettings(this, mNativeContentViewCore); |
| 623 | 623 |
| 624 setContainerViewInternals(internalDispatcher); | 624 setContainerViewInternals(internalDispatcher); |
| 625 mRenderCoordinates.reset(); | 625 mRenderCoordinates.reset(); |
| 626 initPopupZoomer(mContext); | 626 initPopupZoomer(mContext); |
| 627 mImeAdapter = createImeAdapter(mContext); | 627 mImeAdapter = createImeAdapter(mContext); |
| 628 | 628 |
| 629 mAccessibilityInjector = AccessibilityInjector.newInstance(this); | 629 mAccessibilityInjector = AccessibilityInjector.newInstance(this); |
| 630 | 630 |
| 631 mWebContentsObserver = new WebContentsObserverAndroid(mWebContents) { | 631 mWebContentsObserver = new WebContentsObserver(mWebContents) { |
| 632 @Override | 632 @Override |
| 633 public void didNavigateMainFrame(String url, String baseUrl, | 633 public void didNavigateMainFrame(String url, String baseUrl, |
| 634 boolean isNavigationToDifferentPage, boolean isFragmentNavig
ation) { | 634 boolean isNavigationToDifferentPage, boolean isFragmentNavig
ation) { |
| 635 if (!isNavigationToDifferentPage) return; | 635 if (!isNavigationToDifferentPage) return; |
| 636 hidePopupsAndClearSelection(); | 636 hidePopupsAndClearSelection(); |
| 637 resetScrollInProgress(); | 637 resetScrollInProgress(); |
| 638 resetGestureDetection(); | 638 resetGestureDetection(); |
| 639 } | 639 } |
| 640 | 640 |
| 641 @Override | 641 @Override |
| (...skipping 2289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2931 private native void nativeWasResized(long nativeContentViewCoreImpl); | 2931 private native void nativeWasResized(long nativeContentViewCoreImpl); |
| 2932 | 2932 |
| 2933 private native void nativeSetAccessibilityEnabled( | 2933 private native void nativeSetAccessibilityEnabled( |
| 2934 long nativeContentViewCoreImpl, boolean enabled); | 2934 long nativeContentViewCoreImpl, boolean enabled); |
| 2935 | 2935 |
| 2936 private native void nativeExtractSmartClipData(long nativeContentViewCoreImp
l, | 2936 private native void nativeExtractSmartClipData(long nativeContentViewCoreImp
l, |
| 2937 int x, int y, int w, int h); | 2937 int x, int y, int w, int h); |
| 2938 | 2938 |
| 2939 private native void nativeSetBackgroundOpaque(long nativeContentViewCoreImpl
, boolean opaque); | 2939 private native void nativeSetBackgroundOpaque(long nativeContentViewCoreImpl
, boolean opaque); |
| 2940 } | 2940 } |
| OLD | NEW |