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 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 * extractSmartClipData are available. | 224 * extractSmartClipData are available. |
225 */ | 225 */ |
226 public interface SmartClipDataListener { | 226 public interface SmartClipDataListener { |
227 public void onSmartClipDataExtracted(String text, String html, Rect clip
Rect); | 227 public void onSmartClipDataExtracted(String text, String html, Rect clip
Rect); |
228 } | 228 } |
229 | 229 |
230 private final Context mContext; | 230 private final Context mContext; |
231 private ViewGroup mContainerView; | 231 private ViewGroup mContainerView; |
232 private InternalAccessDelegate mContainerViewInternals; | 232 private InternalAccessDelegate mContainerViewInternals; |
233 private WebContents mWebContents; | 233 private WebContents mWebContents; |
234 private WebContentsObserverAndroid mWebContentsObserver; | 234 private WebContentsObserver mWebContentsObserver; |
235 | 235 |
236 private ContentViewClient mContentViewClient; | 236 private ContentViewClient mContentViewClient; |
237 | 237 |
238 private ContentSettings mContentSettings; | 238 private ContentSettings mContentSettings; |
239 | 239 |
240 // Native pointer to C++ ContentViewCoreImpl object which will be set by nat
iveInit(). | 240 // Native pointer to C++ ContentViewCoreImpl object which will be set by nat
iveInit(). |
241 private long mNativeContentViewCore = 0; | 241 private long mNativeContentViewCore = 0; |
242 | 242 |
243 private final ObserverList<GestureStateListener> mGestureStateListeners; | 243 private final ObserverList<GestureStateListener> mGestureStateListeners; |
244 private final RewindableIterator<GestureStateListener> mGestureStateListener
sIterator; | 244 private final RewindableIterator<GestureStateListener> mGestureStateListener
sIterator; |
(...skipping 376 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 2392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3034 private native void nativeWasResized(long nativeContentViewCoreImpl); | 3034 private native void nativeWasResized(long nativeContentViewCoreImpl); |
3035 | 3035 |
3036 private native void nativeSetAccessibilityEnabled( | 3036 private native void nativeSetAccessibilityEnabled( |
3037 long nativeContentViewCoreImpl, boolean enabled); | 3037 long nativeContentViewCoreImpl, boolean enabled); |
3038 | 3038 |
3039 private native void nativeExtractSmartClipData(long nativeContentViewCoreImp
l, | 3039 private native void nativeExtractSmartClipData(long nativeContentViewCoreImp
l, |
3040 int x, int y, int w, int h); | 3040 int x, int y, int w, int h); |
3041 | 3041 |
3042 private native void nativeSetBackgroundOpaque(long nativeContentViewCoreImpl
, boolean opaque); | 3042 private native void nativeSetBackgroundOpaque(long nativeContentViewCoreImpl
, boolean opaque); |
3043 } | 3043 } |
OLD | NEW |