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.content.Context; | 8 import android.content.Context; |
9 import android.content.Intent; | 9 import android.content.Intent; |
10 import android.content.res.Resources; | 10 import android.content.res.Resources; |
(...skipping 2574 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2585 * enabled. | 2585 * enabled. |
2586 */ | 2586 */ |
2587 @CalledByNative | 2587 @CalledByNative |
2588 public void showOfflinePages() { | 2588 public void showOfflinePages() { |
2589 // The offline pages filter view will be loaded by default when offline. | 2589 // The offline pages filter view will be loaded by default when offline. |
2590 EnhancedBookmarkUtils.showBookmarkManager(mActivity); | 2590 EnhancedBookmarkUtils.showBookmarkManager(mActivity); |
2591 } | 2591 } |
2592 | 2592 |
2593 /** | 2593 /** |
2594 * If a Lo-Fi snackbar has not been shown yet for this page load, a Lo-Fi sn
ackbar is shown. | 2594 * If a Lo-Fi snackbar has not been shown yet for this page load, a Lo-Fi sn
ackbar is shown. |
| 2595 * |
| 2596 * @param isPreview Whether the Lo-Fi response was a preview response. |
2595 */ | 2597 */ |
2596 @CalledByNative | 2598 @CalledByNative |
2597 public void onLoFiResponseReceived() { | 2599 public void onLoFiResponseReceived(boolean isPreview) { |
2598 if (mLoFiBarPopupController != null) { | 2600 if (mLoFiBarPopupController != null) { |
2599 mLoFiBarPopupController.maybeCreateLoFiBar(this); | 2601 mLoFiBarPopupController.maybeCreateLoFiBar(this, isPreview); |
2600 } | 2602 } |
2601 } | 2603 } |
2602 | 2604 |
2603 /** | 2605 /** |
2604 * Request that this tab receive focus. Currently, this function requests fo
cus for the main | 2606 * Request that this tab receive focus. Currently, this function requests fo
cus for the main |
2605 * View (usually a ContentView). | 2607 * View (usually a ContentView). |
2606 */ | 2608 */ |
2607 public void requestFocus() { | 2609 public void requestFocus() { |
2608 View view = getView(); | 2610 View view = getView(); |
2609 if (view != null) view.requestFocus(); | 2611 if (view != null) view.requestFocus(); |
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2893 private native void nativeSetInterceptNavigationDelegate(long nativeTabAndro
id, | 2895 private native void nativeSetInterceptNavigationDelegate(long nativeTabAndro
id, |
2894 InterceptNavigationDelegate delegate); | 2896 InterceptNavigationDelegate delegate); |
2895 private native void nativeAttachToTabContentManager(long nativeTabAndroid, | 2897 private native void nativeAttachToTabContentManager(long nativeTabAndroid, |
2896 TabContentManager tabContentManager); | 2898 TabContentManager tabContentManager); |
2897 private native void nativeAttachOverlayContentViewCore(long nativeTabAndroid
, | 2899 private native void nativeAttachOverlayContentViewCore(long nativeTabAndroid
, |
2898 ContentViewCore content, boolean visible); | 2900 ContentViewCore content, boolean visible); |
2899 private native void nativeDetachOverlayContentViewCore(long nativeTabAndroid
, | 2901 private native void nativeDetachOverlayContentViewCore(long nativeTabAndroid
, |
2900 ContentViewCore content); | 2902 ContentViewCore content); |
2901 private native boolean nativeHasPrerenderedUrl(long nativeTabAndroid, String
url); | 2903 private native boolean nativeHasPrerenderedUrl(long nativeTabAndroid, String
url); |
2902 } | 2904 } |
OLD | NEW |