Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(117)

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/tab/Tab.java

Issue 2144423002: [Offline Pages] Fixing bookmarking offline page will save file path. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments. Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkUtils.java ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 2880 matching lines...) Expand 10 before | Expand all | Expand 10 after
2891 * Shows the list of offline pages. This should only be hit when offline pag es feature is 2891 * Shows the list of offline pages. This should only be hit when offline pag es feature is
2892 * enabled. 2892 * enabled.
2893 */ 2893 */
2894 @CalledByNative 2894 @CalledByNative
2895 public void showOfflinePages() { 2895 public void showOfflinePages() {
2896 // The offline pages filter view will be loaded by default when offline. 2896 // The offline pages filter view will be loaded by default when offline.
2897 BookmarkUtils.showBookmarkManager(getActivity()); 2897 BookmarkUtils.showBookmarkManager(getActivity());
2898 } 2898 }
2899 2899
2900 /** 2900 /**
2901 * @return Original url of the tab, if tab currently displays offline copy, would return url of
2902 * the original page. Otherwise return the original url from DOMDistiller.
2903 */
2904 public String getOriginalUrl() {
Ian Wen 2016/07/16 01:04:54 We should convert some other places that we use ge
romax 2016/07/18 22:38:09 Done.
2905 if (isOfflinePage()) {
2906 return getOfflinePageOriginalUrl();
2907 } else {
2908 return DomDistillerUrlUtils.getOriginalUrlFromDistillerUrl(getUrl()) ;
2909 }
2910 }
2911
2912 /**
2901 * If a Lo-Fi snackbar has not been shown yet for this page load, a Lo-Fi sn ackbar is shown. 2913 * If a Lo-Fi snackbar has not been shown yet for this page load, a Lo-Fi sn ackbar is shown.
2902 * 2914 *
2903 * @param isPreview Whether the Lo-Fi response was a preview response. 2915 * @param isPreview Whether the Lo-Fi response was a preview response.
2904 */ 2916 */
2905 @CalledByNative 2917 @CalledByNative
2906 public void onLoFiResponseReceived(boolean isPreview) { 2918 public void onLoFiResponseReceived(boolean isPreview) {
2907 if (getLoFiBarController() != null) { 2919 if (getLoFiBarController() != null) {
2908 mLoFiBarController.maybeCreateLoFiBar(this, isPreview); 2920 mLoFiBarController.maybeCreateLoFiBar(this, isPreview);
2909 } 2921 }
2910 } 2922 }
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after
3260 private native void nativeSetInterceptNavigationDelegate(long nativeTabAndro id, 3272 private native void nativeSetInterceptNavigationDelegate(long nativeTabAndro id,
3261 InterceptNavigationDelegate delegate); 3273 InterceptNavigationDelegate delegate);
3262 private native void nativeAttachToTabContentManager(long nativeTabAndroid, 3274 private native void nativeAttachToTabContentManager(long nativeTabAndroid,
3263 TabContentManager tabContentManager); 3275 TabContentManager tabContentManager);
3264 private native void nativeAttachOverlayContentViewCore(long nativeTabAndroid , 3276 private native void nativeAttachOverlayContentViewCore(long nativeTabAndroid ,
3265 ContentViewCore content, boolean visible); 3277 ContentViewCore content, boolean visible);
3266 private native void nativeDetachOverlayContentViewCore(long nativeTabAndroid , 3278 private native void nativeDetachOverlayContentViewCore(long nativeTabAndroid ,
3267 ContentViewCore content); 3279 ContentViewCore content);
3268 private native boolean nativeHasPrerenderedUrl(long nativeTabAndroid, String url); 3280 private native boolean nativeHasPrerenderedUrl(long nativeTabAndroid, String url);
3269 } 3281 }
OLDNEW
« no previous file with comments | « chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkUtils.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698