| Index: android_webview/java/src/org/chromium/android_webview/AwContents.java
|
| diff --git a/android_webview/java/src/org/chromium/android_webview/AwContents.java b/android_webview/java/src/org/chromium/android_webview/AwContents.java
|
| index 94b0eae75dacaf9cc1ede495ddde70efedf4a9c9..ff2b8e77a16004c30bd0f9cdd64f9f75a5b4bd40 100644
|
| --- a/android_webview/java/src/org/chromium/android_webview/AwContents.java
|
| +++ b/android_webview/java/src/org/chromium/android_webview/AwContents.java
|
| @@ -62,9 +62,8 @@ public class AwContents {
|
| mContentsClient = contentsClient;
|
| mCleanupReference = new CleanupReference(this, new DestroyRunnable(mNativeAwContents));
|
|
|
| - // TODO: upstream the needed ContentViewCore initialization method.
|
| - // mContentViewCore.initialize(containerView, internalAccessAdapter, false,
|
| - // nativeGetWebContents(mNativeAwContents), isAccessFromFileURLsGrantedByDefault);
|
| + mContentViewCore.initialize(containerView, internalAccessAdapter, false,
|
| + nativeGetWebContents(mNativeAwContents), isAccessFromFileURLsGrantedByDefault);
|
| mContentViewCore.setContentViewClient(contentsClient);
|
| }
|
|
|
| @@ -80,8 +79,24 @@ public class AwContents {
|
| mCleanupReference.cleanupNow();
|
| }
|
|
|
| + public int findAllSync(String searchString) {
|
| + return nativeFindAllSync(mNativeAwContents, searchString);
|
| + }
|
| +
|
| + public void findAllAsync(String searchString) {
|
| + nativeFindAllAsync(mNativeAwContents, searchString);
|
| + }
|
| +
|
| + public void findNext(boolean forward) {
|
| + nativeFindNext(mNativeAwContents, forward);
|
| + }
|
| +
|
| + public void clearMatches() {
|
| + nativeClearMatches(mNativeAwContents);
|
| + }
|
| +
|
| /**
|
| - * @return load progress of the WebContents
|
| + * @return load progress of the WebContents.
|
| */
|
| public int getMostRecentProgress() {
|
| // WebContentsDelegateAndroid conveniently caches the most recent notified value for us.
|
| @@ -111,6 +126,12 @@ public class AwContents {
|
| mContentsClient.onReceivedHttpAuthRequest(handler, host, realm);
|
| }
|
|
|
| + @CalledByNative
|
| + public void onFindResultReceived(int activeMatchOrdinal, int numberOfMatches,
|
| + boolean isDoneCounting) {
|
| + mContentsClient.onFindResultReceived(activeMatchOrdinal, numberOfMatches, isDoneCounting);
|
| + }
|
| +
|
| //--------------------------------------------------------------------------------------------
|
| // Native methods
|
| //--------------------------------------------------------------------------------------------
|
| @@ -122,4 +143,9 @@ public class AwContents {
|
| private native int nativeGetWebContents(int nativeAwContents);
|
|
|
| private native void nativeDocumentHasImages(int nativeAwContents, Message message);
|
| +
|
| + private native int nativeFindAllSync(int nativeAwContents, String searchString);
|
| + private native void nativeFindAllAsync(int nativeAwContents, String searchString);
|
| + private native void nativeFindNext(int nativeAwContents, boolean forward);
|
| + private native void nativeClearMatches(int nativeAwContents);
|
| }
|
|
|