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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 import org.chromium.chrome.browser.contextmenu.ContextMenuPopulatorWrapper; | 51 import org.chromium.chrome.browser.contextmenu.ContextMenuPopulatorWrapper; |
52 import org.chromium.chrome.browser.contextmenu.EmptyChromeContextMenuItemDelegat
e; | 52 import org.chromium.chrome.browser.contextmenu.EmptyChromeContextMenuItemDelegat
e; |
53 import org.chromium.chrome.browser.fullscreen.FullscreenManager; | 53 import org.chromium.chrome.browser.fullscreen.FullscreenManager; |
54 import org.chromium.chrome.browser.help.HelpAndFeedback; | 54 import org.chromium.chrome.browser.help.HelpAndFeedback; |
55 import org.chromium.chrome.browser.infobar.InfoBarContainer; | 55 import org.chromium.chrome.browser.infobar.InfoBarContainer; |
56 import org.chromium.chrome.browser.metrics.UmaSessionStats; | 56 import org.chromium.chrome.browser.metrics.UmaSessionStats; |
57 import org.chromium.chrome.browser.metrics.UmaUtils; | 57 import org.chromium.chrome.browser.metrics.UmaUtils; |
58 import org.chromium.chrome.browser.printing.TabPrinter; | 58 import org.chromium.chrome.browser.printing.TabPrinter; |
59 import org.chromium.chrome.browser.profiles.Profile; | 59 import org.chromium.chrome.browser.profiles.Profile; |
60 import org.chromium.chrome.browser.snackbar.SnackbarManager; | 60 import org.chromium.chrome.browser.snackbar.SnackbarManager; |
61 import org.chromium.chrome.browser.ssl.ConnectionSecurity; | |
62 import org.chromium.chrome.browser.ssl.ConnectionSecurityLevel; | 61 import org.chromium.chrome.browser.ssl.ConnectionSecurityLevel; |
| 62 import org.chromium.chrome.browser.ssl.SecurityStateModel; |
63 import org.chromium.chrome.browser.tab.TabUma.TabCreationState; | 63 import org.chromium.chrome.browser.tab.TabUma.TabCreationState; |
64 import org.chromium.chrome.browser.tabmodel.TabModel.TabLaunchType; | 64 import org.chromium.chrome.browser.tabmodel.TabModel.TabLaunchType; |
65 import org.chromium.chrome.browser.tabmodel.TabModel.TabSelectionType; | 65 import org.chromium.chrome.browser.tabmodel.TabModel.TabSelectionType; |
66 import org.chromium.chrome.browser.tabmodel.TabModelBase; | 66 import org.chromium.chrome.browser.tabmodel.TabModelBase; |
67 import org.chromium.chrome.browser.tabmodel.TabModelSelector; | 67 import org.chromium.chrome.browser.tabmodel.TabModelSelector; |
68 import org.chromium.chrome.browser.util.FeatureUtilities; | 68 import org.chromium.chrome.browser.util.FeatureUtilities; |
69 import org.chromium.components.navigation_interception.InterceptNavigationDelega
te; | 69 import org.chromium.components.navigation_interception.InterceptNavigationDelega
te; |
70 import org.chromium.content.browser.ContentView; | 70 import org.chromium.content.browser.ContentView; |
71 import org.chromium.content.browser.ContentViewClient; | 71 import org.chromium.content.browser.ContentViewClient; |
72 import org.chromium.content.browser.ContentViewCore; | 72 import org.chromium.content.browser.ContentViewCore; |
(...skipping 1142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1215 public boolean getUseDesktopUserAgent() { | 1215 public boolean getUseDesktopUserAgent() { |
1216 return getWebContents() != null && getWebContents().getNavigationControl
ler() | 1216 return getWebContents() != null && getWebContents().getNavigationControl
ler() |
1217 .getUseDesktopUserAgent(); | 1217 .getUseDesktopUserAgent(); |
1218 } | 1218 } |
1219 | 1219 |
1220 /** | 1220 /** |
1221 * @return The current {@link ConnectionSecurityLevel} for the tab. | 1221 * @return The current {@link ConnectionSecurityLevel} for the tab. |
1222 */ | 1222 */ |
1223 // TODO(tedchoc): Remove this and transition all clients to use ToolbarModel
directly. | 1223 // TODO(tedchoc): Remove this and transition all clients to use ToolbarModel
directly. |
1224 public int getSecurityLevel() { | 1224 public int getSecurityLevel() { |
1225 return ConnectionSecurity.getSecurityLevelForWebContents(getWebContents(
)); | 1225 return SecurityStateModel.getSecurityLevelForWebContents(getWebContents(
)); |
1226 } | 1226 } |
1227 | 1227 |
1228 /** | 1228 /** |
1229 * @return The sync id of the tab if session sync is enabled, {@code 0} othe
rwise. | 1229 * @return The sync id of the tab if session sync is enabled, {@code 0} othe
rwise. |
1230 */ | 1230 */ |
1231 @CalledByNative | 1231 @CalledByNative |
1232 protected int getSyncId() { | 1232 protected int getSyncId() { |
1233 return mSyncId; | 1233 return mSyncId; |
1234 } | 1234 } |
1235 | 1235 |
(...skipping 1647 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2883 private native void nativeAttachOverlayContentViewCore(long nativeTabAndroid
, | 2883 private native void nativeAttachOverlayContentViewCore(long nativeTabAndroid
, |
2884 ContentViewCore content, boolean visible); | 2884 ContentViewCore content, boolean visible); |
2885 private native void nativeDetachOverlayContentViewCore(long nativeTabAndroid
, | 2885 private native void nativeDetachOverlayContentViewCore(long nativeTabAndroid
, |
2886 ContentViewCore content); | 2886 ContentViewCore content); |
2887 private native boolean nativeHasPrerenderedUrl(long nativeTabAndroid, String
url); | 2887 private native boolean nativeHasPrerenderedUrl(long nativeTabAndroid, String
url); |
2888 private native void nativeOnRendererUnresponsive(long nativeTabAndroid); | 2888 private native void nativeOnRendererUnresponsive(long nativeTabAndroid); |
2889 private native void nativeOnRendererResponsive(long nativeTabAndroid); | 2889 private native void nativeOnRendererResponsive(long nativeTabAndroid); |
2890 | 2890 |
2891 private static native void nativeRecordStartupToCommitUma(); | 2891 private static native void nativeRecordStartupToCommitUma(); |
2892 } | 2892 } |
OLD | NEW |