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 601 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
612 mViewAndroid = new ViewAndroid(windowAndroid, getViewAndroidDelegate()); | 612 mViewAndroid = new ViewAndroid(windowAndroid, getViewAndroidDelegate()); |
613 long viewAndroidNativePointer = mViewAndroid.getNativePointer(); | 613 long viewAndroidNativePointer = mViewAndroid.getNativePointer(); |
614 assert viewAndroidNativePointer != 0; | 614 assert viewAndroidNativePointer != 0; |
615 | 615 |
616 mZoomControlsDelegate = NO_OP_ZOOM_CONTROLS_DELEGATE; | 616 mZoomControlsDelegate = NO_OP_ZOOM_CONTROLS_DELEGATE; |
617 | 617 |
618 mNativeContentViewCore = nativeInit( | 618 mNativeContentViewCore = nativeInit( |
619 nativeWebContents, viewAndroidNativePointer, windowNativePointer
, | 619 nativeWebContents, viewAndroidNativePointer, windowNativePointer
, |
620 mRetainedJavaScriptObjects); | 620 mRetainedJavaScriptObjects); |
621 mWebContents = nativeGetWebContentsAndroid(mNativeContentViewCore); | 621 mWebContents = nativeGetWebContentsAndroid(mNativeContentViewCore); |
| 622 mWebContents.setContext(mContext); |
622 mContentSettings = new ContentSettings(this, mNativeContentViewCore); | 623 mContentSettings = new ContentSettings(this, mNativeContentViewCore); |
623 | 624 |
624 setContainerViewInternals(internalDispatcher); | 625 setContainerViewInternals(internalDispatcher); |
625 mRenderCoordinates.reset(); | 626 mRenderCoordinates.reset(); |
626 initPopupZoomer(mContext); | 627 initPopupZoomer(mContext); |
627 mImeAdapter = createImeAdapter(mContext); | 628 mImeAdapter = createImeAdapter(mContext); |
628 | 629 |
629 mAccessibilityInjector = AccessibilityInjector.newInstance(this); | 630 mAccessibilityInjector = AccessibilityInjector.newInstance(this); |
630 | 631 |
631 mWebContentsObserver = new WebContentsObserverAndroid(mWebContents) { | 632 mWebContentsObserver = new WebContentsObserverAndroid(mWebContents) { |
(...skipping 2299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2931 private native void nativeWasResized(long nativeContentViewCoreImpl); | 2932 private native void nativeWasResized(long nativeContentViewCoreImpl); |
2932 | 2933 |
2933 private native void nativeSetAccessibilityEnabled( | 2934 private native void nativeSetAccessibilityEnabled( |
2934 long nativeContentViewCoreImpl, boolean enabled); | 2935 long nativeContentViewCoreImpl, boolean enabled); |
2935 | 2936 |
2936 private native void nativeExtractSmartClipData(long nativeContentViewCoreImp
l, | 2937 private native void nativeExtractSmartClipData(long nativeContentViewCoreImp
l, |
2937 int x, int y, int w, int h); | 2938 int x, int y, int w, int h); |
2938 | 2939 |
2939 private native void nativeSetBackgroundOpaque(long nativeContentViewCoreImpl
, boolean opaque); | 2940 private native void nativeSetBackgroundOpaque(long nativeContentViewCoreImpl
, boolean opaque); |
2940 } | 2941 } |
OLD | NEW |