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

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

Issue 364793005: Implementation of GetFavicon for current tab. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed the review comment Created 6 years, 5 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 862 matching lines...) Expand 10 before | Expand all | Expand 10 after
873 @CalledByNative 873 @CalledByNative
874 public String getTitle() { 874 public String getTitle() {
875 if (mNativePage != null) return mNativePage.getTitle(); 875 if (mNativePage != null) return mNativePage.getTitle();
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.
884 */ 883 */
885 public Bitmap getFavicon() { 884 public Bitmap getFavicon() {
David Trainor- moved to gerrit 2014/07/07 17:59:04 We need to make sure this bitmap is scaled to 16x1
Jitu( very slow this week) 2014/07/09 11:07:11 I have changed the bitmap to 16x16 in native side.
886 return null; 885 if (mNativeTabAndroid == 0)
886 return null;
887 return nativeGetFavicon(mNativeTabAndroid);
887 } 888 }
888 889
889 /** 890 /**
890 * Loads the tab if it's not loaded (e.g. because it was killed in backgroun d). 891 * 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 892 * @return true iff tab load was triggered
892 */ 893 */
893 @CalledByNative 894 @CalledByNative
894 public boolean loadIfNeeded() { 895 public boolean loadIfNeeded() {
895 return false; 896 return false;
896 } 897 }
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
1144 private native void nativeDestroyWebContents(long nativeTabAndroid, boolean deleteNative); 1145 private native void nativeDestroyWebContents(long nativeTabAndroid, boolean deleteNative);
1145 private native WebContents nativeGetWebContents(long nativeTabAndroid); 1146 private native WebContents nativeGetWebContents(long nativeTabAndroid);
1146 private native Profile nativeGetProfileAndroid(long nativeTabAndroid); 1147 private native Profile nativeGetProfileAndroid(long nativeTabAndroid);
1147 private native int nativeLoadUrl(long nativeTabAndroid, String url, String e xtraHeaders, 1148 private native int nativeLoadUrl(long nativeTabAndroid, String url, String e xtraHeaders,
1148 byte[] postData, int transition, String referrerUrl, int referrerPol icy, 1149 byte[] postData, int transition, String referrerUrl, int referrerPol icy,
1149 boolean isRendererInitiated); 1150 boolean isRendererInitiated);
1150 private native int nativeGetSecurityLevel(long nativeTabAndroid); 1151 private native int nativeGetSecurityLevel(long nativeTabAndroid);
1151 private native void nativeSetActiveNavigationEntryTitleForUrl(long nativeTab Android, String url, 1152 private native void nativeSetActiveNavigationEntryTitleForUrl(long nativeTab Android, String url,
1152 String title); 1153 String title);
1153 private native boolean nativePrint(long nativeTabAndroid); 1154 private native boolean nativePrint(long nativeTabAndroid);
1155 private native Bitmap nativeGetFavicon(long nativeTabAndroid);
1154 } 1156 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/android/tab_android.h » ('j') | chrome/browser/android/tab_android.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698