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

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

Issue 572013002: Removing ContentViewCore dependencies from direct WebContents functions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased the patch and addressed review comments. Created 6 years, 2 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
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; 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
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698