| 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.annotation.SuppressLint; | 7 import android.annotation.SuppressLint; |
| 8 import android.app.Activity; | 8 import android.app.Activity; |
| 9 import android.app.Application; | 9 import android.app.Application; |
| 10 import android.content.Context; | 10 import android.content.Context; |
| (...skipping 2897 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2908 } | 2908 } |
| 2909 | 2909 |
| 2910 /** | 2910 /** |
| 2911 * @return True if the offline page is opened. | 2911 * @return True if the offline page is opened. |
| 2912 */ | 2912 */ |
| 2913 public boolean isOfflinePage() { | 2913 public boolean isOfflinePage() { |
| 2914 return isFrozen() ? false : nativeIsOfflinePage(mNativeTabAndroid); | 2914 return isFrozen() ? false : nativeIsOfflinePage(mNativeTabAndroid); |
| 2915 } | 2915 } |
| 2916 | 2916 |
| 2917 /** | 2917 /** |
| 2918 * @return True if the offline page is opened. |
| 2919 */ |
| 2920 public boolean isShowingOfflinePreview() { |
| 2921 return isFrozen() ? false : nativeIsShowingOfflinePreview(mNativeTabAndr
oid); |
| 2922 } |
| 2923 |
| 2924 /** |
| 2918 * @return The offline page if tab currently displays it, null otherwise. | 2925 * @return The offline page if tab currently displays it, null otherwise. |
| 2919 */ | 2926 */ |
| 2920 public OfflinePageItem getOfflinePage() { | 2927 public OfflinePageItem getOfflinePage() { |
| 2921 return isFrozen() ? null : nativeGetOfflinePage(mNativeTabAndroid); | 2928 return isFrozen() ? null : nativeGetOfflinePage(mNativeTabAndroid); |
| 2922 } | 2929 } |
| 2923 | 2930 |
| 2924 /** | 2931 /** |
| 2925 * Shows the list of offline pages. This should only be hit when offline pag
es feature is | 2932 * Shows the list of offline pages. This should only be hit when offline pag
es feature is |
| 2926 * enabled. | 2933 * enabled. |
| 2927 */ | 2934 */ |
| (...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3279 private native void nativeSetActiveNavigationEntryTitleForUrl(long nativeTab
Android, String url, | 3286 private native void nativeSetActiveNavigationEntryTitleForUrl(long nativeTab
Android, String url, |
| 3280 String title); | 3287 String title); |
| 3281 private native boolean nativePrint(long nativeTabAndroid); | 3288 private native boolean nativePrint(long nativeTabAndroid); |
| 3282 private native Bitmap nativeGetFavicon(long nativeTabAndroid); | 3289 private native Bitmap nativeGetFavicon(long nativeTabAndroid); |
| 3283 private native void nativeCreateHistoricalTab(long nativeTabAndroid); | 3290 private native void nativeCreateHistoricalTab(long nativeTabAndroid); |
| 3284 private native void nativeUpdateTopControlsState( | 3291 private native void nativeUpdateTopControlsState( |
| 3285 long nativeTabAndroid, int constraints, int current, boolean animate
); | 3292 long nativeTabAndroid, int constraints, int current, boolean animate
); |
| 3286 private native void nativeLoadOriginalImage(long nativeTabAndroid); | 3293 private native void nativeLoadOriginalImage(long nativeTabAndroid); |
| 3287 private native long nativeGetBookmarkId(long nativeTabAndroid, boolean onlyE
ditable); | 3294 private native long nativeGetBookmarkId(long nativeTabAndroid, boolean onlyE
ditable); |
| 3288 private native boolean nativeIsOfflinePage(long nativeTabAndroid); | 3295 private native boolean nativeIsOfflinePage(long nativeTabAndroid); |
| 3296 private native boolean nativeIsShowingOfflinePreview(long nativeTabAndroid); |
| 3289 private native OfflinePageItem nativeGetOfflinePage(long nativeTabAndroid); | 3297 private native OfflinePageItem nativeGetOfflinePage(long nativeTabAndroid); |
| 3290 private native void nativeSetInterceptNavigationDelegate(long nativeTabAndro
id, | 3298 private native void nativeSetInterceptNavigationDelegate(long nativeTabAndro
id, |
| 3291 InterceptNavigationDelegate delegate); | 3299 InterceptNavigationDelegate delegate); |
| 3292 private native void nativeAttachToTabContentManager(long nativeTabAndroid, | 3300 private native void nativeAttachToTabContentManager(long nativeTabAndroid, |
| 3293 TabContentManager tabContentManager); | 3301 TabContentManager tabContentManager); |
| 3294 private native void nativeAttachOverlayWebContents( | 3302 private native void nativeAttachOverlayWebContents( |
| 3295 long nativeTabAndroid, WebContents webContents, boolean visible); | 3303 long nativeTabAndroid, WebContents webContents, boolean visible); |
| 3296 private native void nativeDetachOverlayWebContents( | 3304 private native void nativeDetachOverlayWebContents( |
| 3297 long nativeTabAndroid, WebContents webContents); | 3305 long nativeTabAndroid, WebContents webContents); |
| 3298 private native boolean nativeHasPrerenderedUrl(long nativeTabAndroid, String
url); | 3306 private native boolean nativeHasPrerenderedUrl(long nativeTabAndroid, String
url); |
| 3299 } | 3307 } |
| OLD | NEW |