| 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 2889 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2900 * Shows the list of offline pages. This should only be hit when offline pag
es feature is | 2900 * Shows the list of offline pages. This should only be hit when offline pag
es feature is |
| 2901 * enabled. | 2901 * enabled. |
| 2902 */ | 2902 */ |
| 2903 @CalledByNative | 2903 @CalledByNative |
| 2904 public void showOfflinePages() { | 2904 public void showOfflinePages() { |
| 2905 // TODO(jianli): This is not currently used. Figure out what to do here. | 2905 // TODO(jianli): This is not currently used. Figure out what to do here. |
| 2906 // http://crbug.com/636574 | 2906 // http://crbug.com/636574 |
| 2907 } | 2907 } |
| 2908 | 2908 |
| 2909 /** | 2909 /** |
| 2910 * @return Original url of the tab, if tab currently displays offline copy,
would return url of | 2910 * @return Original url of the tab, which is the original url from DOMDistil
ler. |
| 2911 * the original page. Otherwise return the original url from DOMDistiller. | |
| 2912 */ | 2911 */ |
| 2913 public String getOriginalUrl() { | 2912 public String getOriginalUrl() { |
| 2914 OfflinePageItem offlinePage = getOfflinePage(); | |
| 2915 if (offlinePage != null) return offlinePage.getUrl(); | |
| 2916 return DomDistillerUrlUtils.getOriginalUrlFromDistillerUrl(getUrl()); | 2913 return DomDistillerUrlUtils.getOriginalUrlFromDistillerUrl(getUrl()); |
| 2917 } | 2914 } |
| 2918 | 2915 |
| 2919 /** | 2916 /** |
| 2920 * If a Lo-Fi snackbar has not been shown yet for this page load, a Lo-Fi sn
ackbar is shown. | 2917 * If a Lo-Fi snackbar has not been shown yet for this page load, a Lo-Fi sn
ackbar is shown. |
| 2921 * | 2918 * |
| 2922 * @param isPreview Whether the Lo-Fi response was a preview response. | 2919 * @param isPreview Whether the Lo-Fi response was a preview response. |
| 2923 */ | 2920 */ |
| 2924 @CalledByNative | 2921 @CalledByNative |
| 2925 public void onLoFiResponseReceived(boolean isPreview) { | 2922 public void onLoFiResponseReceived(boolean isPreview) { |
| (...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3278 private native void nativeSetInterceptNavigationDelegate(long nativeTabAndro
id, | 3275 private native void nativeSetInterceptNavigationDelegate(long nativeTabAndro
id, |
| 3279 InterceptNavigationDelegate delegate); | 3276 InterceptNavigationDelegate delegate); |
| 3280 private native void nativeAttachToTabContentManager(long nativeTabAndroid, | 3277 private native void nativeAttachToTabContentManager(long nativeTabAndroid, |
| 3281 TabContentManager tabContentManager); | 3278 TabContentManager tabContentManager); |
| 3282 private native void nativeAttachOverlayWebContents( | 3279 private native void nativeAttachOverlayWebContents( |
| 3283 long nativeTabAndroid, WebContents webContents, boolean visible); | 3280 long nativeTabAndroid, WebContents webContents, boolean visible); |
| 3284 private native void nativeDetachOverlayWebContents( | 3281 private native void nativeDetachOverlayWebContents( |
| 3285 long nativeTabAndroid, WebContents webContents); | 3282 long nativeTabAndroid, WebContents webContents); |
| 3286 private native boolean nativeHasPrerenderedUrl(long nativeTabAndroid, String
url); | 3283 private native boolean nativeHasPrerenderedUrl(long nativeTabAndroid, String
url); |
| 3287 } | 3284 } |
| OLD | NEW |