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; | 5 package org.chromium.chrome.browser; |
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.graphics.Bitmap; | 9 import android.graphics.Bitmap; |
10 import android.graphics.Color; | 10 import android.graphics.Color; |
(...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
460 * a bad HTTPS page. | 460 * a bad HTTPS page. |
461 */ | 461 */ |
462 public boolean isShowingInterstitialPage() { | 462 public boolean isShowingInterstitialPage() { |
463 return getWebContents() != null && getWebContents().isShowingInterstitia
lPage(); | 463 return getWebContents() != null && getWebContents().isShowingInterstitia
lPage(); |
464 } | 464 } |
465 | 465 |
466 /** | 466 /** |
467 * @return Whether or not the tab has something valid to render. | 467 * @return Whether or not the tab has something valid to render. |
468 */ | 468 */ |
469 public boolean isReady() { | 469 public boolean isReady() { |
470 return mNativePage != null || (mContentViewCore != null && mContentViewC
ore.isReady()); | 470 return mNativePage != null || (getWebContents() != null && getWebContent
s().isReady()); |
471 } | 471 } |
472 | 472 |
473 /** | 473 /** |
474 * @return The {@link View} displaying the current page in the tab. This mig
ht be a | 474 * @return The {@link View} displaying the current page in the tab. This mig
ht be a |
475 * native view or a placeholder view for content rendered by the com
positor. | 475 * native view or a placeholder view for content rendered by the com
positor. |
476 * This can be {@code null}, if the tab is frozen or being initializ
ed or destroyed. | 476 * This can be {@code null}, if the tab is frozen or being initializ
ed or destroyed. |
477 */ | 477 */ |
478 public View getView() { | 478 public View getView() { |
479 return mNativePage != null ? mNativePage.getView() : | 479 return mNativePage != null ? mNativePage.getView() : |
480 (mContentViewCore != null ? mContentViewCore.getContainerView()
: null); | 480 (mContentViewCore != null ? mContentViewCore.getContainerView()
: null); |
(...skipping 722 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1203 private native int nativeLoadUrl(long nativeTabAndroid, String url, String e
xtraHeaders, | 1203 private native int nativeLoadUrl(long nativeTabAndroid, String url, String e
xtraHeaders, |
1204 byte[] postData, int transition, String referrerUrl, int referrerPol
icy, | 1204 byte[] postData, int transition, String referrerUrl, int referrerPol
icy, |
1205 boolean isRendererInitiated); | 1205 boolean isRendererInitiated); |
1206 private native int nativeGetSecurityLevel(long nativeTabAndroid); | 1206 private native int nativeGetSecurityLevel(long nativeTabAndroid); |
1207 private native void nativeSetActiveNavigationEntryTitleForUrl(long nativeTab
Android, String url, | 1207 private native void nativeSetActiveNavigationEntryTitleForUrl(long nativeTab
Android, String url, |
1208 String title); | 1208 String title); |
1209 private native boolean nativePrint(long nativeTabAndroid); | 1209 private native boolean nativePrint(long nativeTabAndroid); |
1210 private native Bitmap nativeGetFavicon(long nativeTabAndroid); | 1210 private native Bitmap nativeGetFavicon(long nativeTabAndroid); |
1211 private native boolean nativeIsFaviconValid(long nativeTabAndroid); | 1211 private native boolean nativeIsFaviconValid(long nativeTabAndroid); |
1212 } | 1212 } |
OLD | NEW |