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 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
453 // Update cached title then notify observers. | 453 // Update cached title then notify observers. |
454 updateTitle(); | 454 updateTitle(); |
455 } | 455 } |
456 if ((flags & InvalidateTypes.URL) != 0) { | 456 if ((flags & InvalidateTypes.URL) != 0) { |
457 for (TabObserver observer : mObservers) observer.onUrlUpdated(Ta b.this); | 457 for (TabObserver observer : mObservers) observer.onUrlUpdated(Ta b.this); |
458 } | 458 } |
459 } | 459 } |
460 | 460 |
461 @Override | 461 @Override |
462 public void visibleSSLStateChanged() { | 462 public void visibleSSLStateChanged() { |
463 SecurityStateModel.securityStateChanged(getWebContents()); | |
Ted C
2015/09/04 00:36:50
To avoid exposing the securityStateChanged method
estark
2015/09/04 16:53:09
Done.
| |
463 for (TabObserver observer : mObservers) observer.onSSLStateUpdated(T ab.this); | 464 for (TabObserver observer : mObservers) observer.onSSLStateUpdated(T ab.this); |
464 } | 465 } |
465 | 466 |
466 @Override | 467 @Override |
467 public void webContentsCreated(WebContents sourceWebContents, long opene rRenderFrameId, | 468 public void webContentsCreated(WebContents sourceWebContents, long opene rRenderFrameId, |
468 String frameName, String targetUrl, WebContents newWebContents) { | 469 String frameName, String targetUrl, WebContents newWebContents) { |
469 for (TabObserver observer : mObservers) { | 470 for (TabObserver observer : mObservers) { |
470 observer.webContentsCreated(Tab.this, sourceWebContents, openerR enderFrameId, | 471 observer.webContentsCreated(Tab.this, sourceWebContents, openerR enderFrameId, |
471 frameName, targetUrl, newWebContents); | 472 frameName, targetUrl, newWebContents); |
472 } | 473 } |
(...skipping 740 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1213 public boolean getUseDesktopUserAgent() { | 1214 public boolean getUseDesktopUserAgent() { |
1214 return getWebContents() != null && getWebContents().getNavigationControl ler() | 1215 return getWebContents() != null && getWebContents().getNavigationControl ler() |
1215 .getUseDesktopUserAgent(); | 1216 .getUseDesktopUserAgent(); |
1216 } | 1217 } |
1217 | 1218 |
1218 /** | 1219 /** |
1219 * @return The current {@link ConnectionSecurityLevel} for the tab. | 1220 * @return The current {@link ConnectionSecurityLevel} for the tab. |
1220 */ | 1221 */ |
1221 // TODO(tedchoc): Remove this and transition all clients to use ToolbarModel directly. | 1222 // TODO(tedchoc): Remove this and transition all clients to use ToolbarModel directly. |
1222 public int getSecurityLevel() { | 1223 public int getSecurityLevel() { |
1223 return ConnectionSecurity.getSecurityLevelForWebContents(getWebContents( )); | 1224 return SecurityStateModel.getSecurityLevelForWebContents(getWebContents( )); |
1224 } | 1225 } |
1225 | 1226 |
1226 /** | 1227 /** |
1227 * @return The sync id of the tab if session sync is enabled, {@code 0} othe rwise. | 1228 * @return The sync id of the tab if session sync is enabled, {@code 0} othe rwise. |
1228 */ | 1229 */ |
1229 @CalledByNative | 1230 @CalledByNative |
1230 protected int getSyncId() { | 1231 protected int getSyncId() { |
1231 return mSyncId; | 1232 return mSyncId; |
1232 } | 1233 } |
1233 | 1234 |
(...skipping 1645 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2879 private native void nativeAttachToTabContentManager(long nativeTabAndroid, | 2880 private native void nativeAttachToTabContentManager(long nativeTabAndroid, |
2880 TabContentManager tabContentManager); | 2881 TabContentManager tabContentManager); |
2881 private native void nativeAttachOverlayContentViewCore(long nativeTabAndroid , | 2882 private native void nativeAttachOverlayContentViewCore(long nativeTabAndroid , |
2882 ContentViewCore content, boolean visible); | 2883 ContentViewCore content, boolean visible); |
2883 private native void nativeDetachOverlayContentViewCore(long nativeTabAndroid , | 2884 private native void nativeDetachOverlayContentViewCore(long nativeTabAndroid , |
2884 ContentViewCore content); | 2885 ContentViewCore content); |
2885 private native boolean nativeHasPrerenderedUrl(long nativeTabAndroid, String url); | 2886 private native boolean nativeHasPrerenderedUrl(long nativeTabAndroid, String url); |
2886 | 2887 |
2887 private static native void nativeRecordStartupToCommitUma(); | 2888 private static native void nativeRecordStartupToCommitUma(); |
2888 } | 2889 } |
OLD | NEW |