| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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.tab; | 5 package org.chromium.chrome.browser.tab; |
| 6 | 6 |
| 7 import android.app.Activity; | 7 import android.app.Activity; |
| 8 import android.app.Application; | 8 import android.app.Application; |
| 9 import android.content.Context; | 9 import android.content.Context; |
| 10 import android.content.Intent; | 10 import android.content.Intent; |
| (...skipping 994 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1005 | 1005 |
| 1006 /** | 1006 /** |
| 1007 * Reloads the current page content. | 1007 * Reloads the current page content. |
| 1008 */ | 1008 */ |
| 1009 public void reload() { | 1009 public void reload() { |
| 1010 // TODO(dtrainor): Should we try to rebuild the ContentView if it's froz
en? | 1010 // TODO(dtrainor): Should we try to rebuild the ContentView if it's froz
en? |
| 1011 if (isBlimpTab()) { | 1011 if (isBlimpTab()) { |
| 1012 if (getBlimpContents() != null) { | 1012 if (getBlimpContents() != null) { |
| 1013 getBlimpContents().getNavigationController().reload(); | 1013 getBlimpContents().getNavigationController().reload(); |
| 1014 } | 1014 } |
| 1015 } else if (isOfflinePage()) { |
| 1016 // If current page is an offline page, reload it with custom behavio
r defined in extra |
| 1017 // header respected. |
| 1018 LoadUrlParams params = |
| 1019 new LoadUrlParams(getOriginalUrl(), PageTransition.RELOAD); |
| 1020 params.setVerbatimHeaders(nativeGetOfflinePageHeaderForReload(mNativ
eTabAndroid)); |
| 1021 loadUrl(params); |
| 1015 } else { | 1022 } else { |
| 1016 if (getWebContents() != null) getWebContents().getNavigationControll
er().reload(true); | 1023 if (getWebContents() != null) getWebContents().getNavigationControll
er().reload(true); |
| 1017 } | 1024 } |
| 1018 } | 1025 } |
| 1019 | 1026 |
| 1020 /** | 1027 /** |
| 1021 * Reloads the current page content. | 1028 * Reloads the current page content. |
| 1022 * This version ignores the cache and reloads from the network. | 1029 * This version ignores the cache and reloads from the network. |
| 1023 */ | 1030 */ |
| 1024 public void reloadIgnoringCache() { | 1031 public void reloadIgnoringCache() { |
| (...skipping 2263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3288 String title); | 3295 String title); |
| 3289 private native boolean nativePrint(long nativeTabAndroid); | 3296 private native boolean nativePrint(long nativeTabAndroid); |
| 3290 private native Bitmap nativeGetFavicon(long nativeTabAndroid); | 3297 private native Bitmap nativeGetFavicon(long nativeTabAndroid); |
| 3291 private native void nativeCreateHistoricalTab(long nativeTabAndroid); | 3298 private native void nativeCreateHistoricalTab(long nativeTabAndroid); |
| 3292 private native void nativeUpdateTopControlsState( | 3299 private native void nativeUpdateTopControlsState( |
| 3293 long nativeTabAndroid, int constraints, int current, boolean animate
); | 3300 long nativeTabAndroid, int constraints, int current, boolean animate
); |
| 3294 private native void nativeLoadOriginalImage(long nativeTabAndroid); | 3301 private native void nativeLoadOriginalImage(long nativeTabAndroid); |
| 3295 private native long nativeGetBookmarkId(long nativeTabAndroid, boolean onlyE
ditable); | 3302 private native long nativeGetBookmarkId(long nativeTabAndroid, boolean onlyE
ditable); |
| 3296 private native boolean nativeIsOfflinePage(long nativeTabAndroid); | 3303 private native boolean nativeIsOfflinePage(long nativeTabAndroid); |
| 3297 private native OfflinePageItem nativeGetOfflinePage(long nativeTabAndroid); | 3304 private native OfflinePageItem nativeGetOfflinePage(long nativeTabAndroid); |
| 3305 private native String nativeGetOfflinePageHeaderForReload(long nativeTabAndr
oid); |
| 3298 private native void nativeSetInterceptNavigationDelegate(long nativeTabAndro
id, | 3306 private native void nativeSetInterceptNavigationDelegate(long nativeTabAndro
id, |
| 3299 InterceptNavigationDelegate delegate); | 3307 InterceptNavigationDelegate delegate); |
| 3300 private native void nativeAttachToTabContentManager(long nativeTabAndroid, | 3308 private native void nativeAttachToTabContentManager(long nativeTabAndroid, |
| 3301 TabContentManager tabContentManager); | 3309 TabContentManager tabContentManager); |
| 3302 private native void nativeAttachOverlayWebContents( | 3310 private native void nativeAttachOverlayWebContents( |
| 3303 long nativeTabAndroid, WebContents webContents, boolean visible); | 3311 long nativeTabAndroid, WebContents webContents, boolean visible); |
| 3304 private native void nativeDetachOverlayWebContents( | 3312 private native void nativeDetachOverlayWebContents( |
| 3305 long nativeTabAndroid, WebContents webContents); | 3313 long nativeTabAndroid, WebContents webContents); |
| 3306 private native boolean nativeHasPrerenderedUrl(long nativeTabAndroid, String
url); | 3314 private native boolean nativeHasPrerenderedUrl(long nativeTabAndroid, String
url); |
| 3307 } | 3315 } |
| OLD | NEW |