| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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.webcontents; | 5 package org.chromium.content.browser.webcontents; |
| 6 | 6 |
| 7 import android.annotation.SuppressLint; | 7 import android.annotation.SuppressLint; |
| 8 import android.graphics.Bitmap; | 8 import android.graphics.Bitmap; |
| 9 import android.graphics.Rect; | 9 import android.graphics.Rect; |
| 10 import android.os.Bundle; | 10 import android.os.Bundle; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 import org.chromium.content.browser.AppWebMessagePort; | 21 import org.chromium.content.browser.AppWebMessagePort; |
| 22 import org.chromium.content.browser.AppWebMessagePortService; | 22 import org.chromium.content.browser.AppWebMessagePortService; |
| 23 import org.chromium.content.browser.MediaSessionImpl; | 23 import org.chromium.content.browser.MediaSessionImpl; |
| 24 import org.chromium.content_public.browser.AccessibilitySnapshotCallback; | 24 import org.chromium.content_public.browser.AccessibilitySnapshotCallback; |
| 25 import org.chromium.content_public.browser.AccessibilitySnapshotNode; | 25 import org.chromium.content_public.browser.AccessibilitySnapshotNode; |
| 26 import org.chromium.content_public.browser.ContentBitmapCallback; | 26 import org.chromium.content_public.browser.ContentBitmapCallback; |
| 27 import org.chromium.content_public.browser.ImageDownloadCallback; | 27 import org.chromium.content_public.browser.ImageDownloadCallback; |
| 28 import org.chromium.content_public.browser.JavaScriptCallback; | 28 import org.chromium.content_public.browser.JavaScriptCallback; |
| 29 import org.chromium.content_public.browser.MessagePortService; | 29 import org.chromium.content_public.browser.MessagePortService; |
| 30 import org.chromium.content_public.browser.NavigationController; | 30 import org.chromium.content_public.browser.NavigationController; |
| 31 import org.chromium.content_public.browser.RenderFrameHost; |
| 31 import org.chromium.content_public.browser.SmartClipCallback; | 32 import org.chromium.content_public.browser.SmartClipCallback; |
| 32 import org.chromium.content_public.browser.WebContents; | 33 import org.chromium.content_public.browser.WebContents; |
| 33 import org.chromium.content_public.browser.WebContentsObserver; | 34 import org.chromium.content_public.browser.WebContentsObserver; |
| 34 import org.chromium.ui.OverscrollRefreshHandler; | 35 import org.chromium.ui.OverscrollRefreshHandler; |
| 35 import org.chromium.ui.accessibility.AXTextStyle; | 36 import org.chromium.ui.accessibility.AXTextStyle; |
| 36 | 37 |
| 37 import java.util.ArrayList; | 38 import java.util.ArrayList; |
| 38 import java.util.List; | 39 import java.util.List; |
| 39 import java.util.UUID; | 40 import java.util.UUID; |
| 40 | 41 |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 public boolean isDestroyed() { | 161 public boolean isDestroyed() { |
| 161 return mNativeWebContentsAndroid == 0; | 162 return mNativeWebContentsAndroid == 0; |
| 162 } | 163 } |
| 163 | 164 |
| 164 @Override | 165 @Override |
| 165 public NavigationController getNavigationController() { | 166 public NavigationController getNavigationController() { |
| 166 return mNavigationController; | 167 return mNavigationController; |
| 167 } | 168 } |
| 168 | 169 |
| 169 @Override | 170 @Override |
| 171 public RenderFrameHost getMainFrame() { |
| 172 return nativeGetMainFrame(mNativeWebContentsAndroid); |
| 173 } |
| 174 |
| 175 @Override |
| 170 public String getTitle() { | 176 public String getTitle() { |
| 171 return nativeGetTitle(mNativeWebContentsAndroid); | 177 return nativeGetTitle(mNativeWebContentsAndroid); |
| 172 } | 178 } |
| 173 | 179 |
| 174 @Override | 180 @Override |
| 175 public String getVisibleUrl() { | 181 public String getVisibleUrl() { |
| 176 return nativeGetVisibleURL(mNativeWebContentsAndroid); | 182 return nativeGetVisibleURL(mNativeWebContentsAndroid); |
| 177 } | 183 } |
| 178 | 184 |
| 179 @Override | 185 @Override |
| (...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 533 @CalledByNative | 539 @CalledByNative |
| 534 private static void createSizeAndAddToList(List<Rect> sizes, int width, int
height) { | 540 private static void createSizeAndAddToList(List<Rect> sizes, int width, int
height) { |
| 535 sizes.add(new Rect(0, 0, width, height)); | 541 sizes.add(new Rect(0, 0, width, height)); |
| 536 } | 542 } |
| 537 | 543 |
| 538 // This is static to avoid exposing a public destroy method on the native si
de of this class. | 544 // This is static to avoid exposing a public destroy method on the native si
de of this class. |
| 539 private static native void nativeDestroyWebContents(long webContentsAndroidP
tr); | 545 private static native void nativeDestroyWebContents(long webContentsAndroidP
tr); |
| 540 | 546 |
| 541 private static native WebContents nativeFromNativePtr(long webContentsAndroi
dPtr); | 547 private static native WebContents nativeFromNativePtr(long webContentsAndroi
dPtr); |
| 542 | 548 |
| 549 private native RenderFrameHost nativeGetMainFrame(long nativeWebContentsAndr
oid); |
| 543 private native String nativeGetTitle(long nativeWebContentsAndroid); | 550 private native String nativeGetTitle(long nativeWebContentsAndroid); |
| 544 private native String nativeGetVisibleURL(long nativeWebContentsAndroid); | 551 private native String nativeGetVisibleURL(long nativeWebContentsAndroid); |
| 545 private native boolean nativeIsLoading(long nativeWebContentsAndroid); | 552 private native boolean nativeIsLoading(long nativeWebContentsAndroid); |
| 546 private native boolean nativeIsLoadingToDifferentDocument(long nativeWebCont
entsAndroid); | 553 private native boolean nativeIsLoadingToDifferentDocument(long nativeWebCont
entsAndroid); |
| 547 private native void nativeStop(long nativeWebContentsAndroid); | 554 private native void nativeStop(long nativeWebContentsAndroid); |
| 548 private native void nativeCut(long nativeWebContentsAndroid); | 555 private native void nativeCut(long nativeWebContentsAndroid); |
| 549 private native void nativeCopy(long nativeWebContentsAndroid); | 556 private native void nativeCopy(long nativeWebContentsAndroid); |
| 550 private native void nativePaste(long nativeWebContentsAndroid); | 557 private native void nativePaste(long nativeWebContentsAndroid); |
| 551 private native void nativeReplace(long nativeWebContentsAndroid, String word
); | 558 private native void nativeReplace(long nativeWebContentsAndroid, String word
); |
| 552 private native void nativeSelectAll(long nativeWebContentsAndroid); | 559 private native void nativeSelectAll(long nativeWebContentsAndroid); |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 593 long nativeWebContentsAndroid, OverscrollRefreshHandler nativeOversc
rollRefreshHandler); | 600 long nativeWebContentsAndroid, OverscrollRefreshHandler nativeOversc
rollRefreshHandler); |
| 594 private native void nativeGetContentBitmap(long nativeWebContentsAndroid, | 601 private native void nativeGetContentBitmap(long nativeWebContentsAndroid, |
| 595 ContentBitmapCallback callback, Bitmap.Config config, float scale, | 602 ContentBitmapCallback callback, Bitmap.Config config, float scale, |
| 596 float x, float y, float width, float height); | 603 float x, float y, float width, float height); |
| 597 private native void nativeReloadLoFiImages(long nativeWebContentsAndroid); | 604 private native void nativeReloadLoFiImages(long nativeWebContentsAndroid); |
| 598 private native int nativeDownloadImage(long nativeWebContentsAndroid, | 605 private native int nativeDownloadImage(long nativeWebContentsAndroid, |
| 599 String url, boolean isFavicon, int maxBitmapSize, | 606 String url, boolean isFavicon, int maxBitmapSize, |
| 600 boolean bypassCache, ImageDownloadCallback callback); | 607 boolean bypassCache, ImageDownloadCallback callback); |
| 601 private native void nativeDismissTextHandles(long nativeWebContentsAndroid); | 608 private native void nativeDismissTextHandles(long nativeWebContentsAndroid); |
| 602 } | 609 } |
| OLD | NEW |