| 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 865 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 876 if (mContentViewCore != null) return mContentViewCore.getTitle(); | 876 if (mContentViewCore != null) return mContentViewCore.getTitle(); |
| 877 return ""; | 877 return ""; |
| 878 } | 878 } |
| 879 | 879 |
| 880 /** | 880 /** |
| 881 * @return The bitmap of the favicon scaled to 16x16dp. null if no favicon | 881 * @return The bitmap of the favicon scaled to 16x16dp. null if no favicon |
| 882 * is specified or it requires the default favicon. | 882 * is specified or it requires the default favicon. |
| 883 * TODO(bauerb): Upstream implementation. | 883 * TODO(bauerb): Upstream implementation. |
| 884 */ | 884 */ |
| 885 public Bitmap getFavicon() { | 885 public Bitmap getFavicon() { |
| 886 return null; | 886 if (mNativeTabAndroid == 0) |
| 887 return null; |
| 888 return nativeGetCurrentTabFavicon(mNativeTabAndroid); |
| 887 } | 889 } |
| 888 | 890 |
| 889 /** | 891 /** |
| 890 * Loads the tab if it's not loaded (e.g. because it was killed in backgroun
d). | 892 * Loads the tab if it's not loaded (e.g. because it was killed in backgroun
d). |
| 891 * @return true iff tab load was triggered | 893 * @return true iff tab load was triggered |
| 892 */ | 894 */ |
| 893 @CalledByNative | 895 @CalledByNative |
| 894 public boolean loadIfNeeded() { | 896 public boolean loadIfNeeded() { |
| 895 return false; | 897 return false; |
| 896 } | 898 } |
| (...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1144 private native void nativeDestroyWebContents(long nativeTabAndroid, boolean
deleteNative); | 1146 private native void nativeDestroyWebContents(long nativeTabAndroid, boolean
deleteNative); |
| 1145 private native WebContents nativeGetWebContents(long nativeTabAndroid); | 1147 private native WebContents nativeGetWebContents(long nativeTabAndroid); |
| 1146 private native Profile nativeGetProfileAndroid(long nativeTabAndroid); | 1148 private native Profile nativeGetProfileAndroid(long nativeTabAndroid); |
| 1147 private native int nativeLoadUrl(long nativeTabAndroid, String url, String e
xtraHeaders, | 1149 private native int nativeLoadUrl(long nativeTabAndroid, String url, String e
xtraHeaders, |
| 1148 byte[] postData, int transition, String referrerUrl, int referrerPol
icy, | 1150 byte[] postData, int transition, String referrerUrl, int referrerPol
icy, |
| 1149 boolean isRendererInitiated); | 1151 boolean isRendererInitiated); |
| 1150 private native int nativeGetSecurityLevel(long nativeTabAndroid); | 1152 private native int nativeGetSecurityLevel(long nativeTabAndroid); |
| 1151 private native void nativeSetActiveNavigationEntryTitleForUrl(long nativeTab
Android, String url, | 1153 private native void nativeSetActiveNavigationEntryTitleForUrl(long nativeTab
Android, String url, |
| 1152 String title); | 1154 String title); |
| 1153 private native boolean nativePrint(long nativeTabAndroid); | 1155 private native boolean nativePrint(long nativeTabAndroid); |
| 1156 private native Bitmap nativeGetCurrentTabFavicon(long nativeTabAndroid); |
| 1154 } | 1157 } |
| OLD | NEW |