| 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.chrome.browser.prerender; | 5 package org.chromium.chrome.browser.prerender; |
| 6 | 6 |
| 7 import org.chromium.base.JNINamespace; | 7 import org.chromium.base.JNINamespace; |
| 8 import org.chromium.chrome.browser.ContentViewUtil; | 8 import org.chromium.chrome.browser.ContentViewUtil; |
| 9 import org.chromium.chrome.browser.profiles.Profile; | 9 import org.chromium.chrome.browser.profiles.Profile; |
| 10 | 10 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 } | 31 } |
| 32 | 32 |
| 33 public void cancelCurrentPrerender() { | 33 public void cancelCurrentPrerender() { |
| 34 nativeCancelCurrentPrerender(mNativeExternalPrerenderHandler); | 34 nativeCancelCurrentPrerender(mNativeExternalPrerenderHandler); |
| 35 } | 35 } |
| 36 | 36 |
| 37 public static boolean hasPrerenderedUrl(Profile profile, String url, long we
bContentsPtr) { | 37 public static boolean hasPrerenderedUrl(Profile profile, String url, long we
bContentsPtr) { |
| 38 return nativeHasPrerenderedUrl(profile, url, webContentsPtr); | 38 return nativeHasPrerenderedUrl(profile, url, webContentsPtr); |
| 39 } | 39 } |
| 40 | 40 |
| 41 public static boolean hasCookieStoreLoaded(Profile profile) { |
| 42 return nativeHasCookieStoreLoaded(profile); |
| 43 } |
| 44 |
| 41 private static native long nativeInit(); | 45 private static native long nativeInit(); |
| 42 private static native boolean nativeAddPrerender( | 46 private static native boolean nativeAddPrerender( |
| 43 long nativeExternalPrerenderHandlerAndroid, Profile profile, | 47 long nativeExternalPrerenderHandlerAndroid, Profile profile, |
| 44 long webContentsPtr, String url, String referrer, int width, int hei
ght); | 48 long webContentsPtr, String url, String referrer, int width, int hei
ght); |
| 45 private static native boolean nativeHasPrerenderedUrl( | 49 private static native boolean nativeHasPrerenderedUrl( |
| 46 Profile profile, String url, long webContentsPtr); | 50 Profile profile, String url, long webContentsPtr); |
| 51 private static native boolean nativeHasCookieStoreLoaded( |
| 52 Profile profile); |
| 47 private static native void nativeCancelCurrentPrerender( | 53 private static native void nativeCancelCurrentPrerender( |
| 48 long nativeExternalPrerenderHandlerAndroid); | 54 long nativeExternalPrerenderHandlerAndroid); |
| 49 } | 55 } |
| OLD | NEW |