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

Side by Side Diff: chrome/browser/ui/android/navigation_popup.cc

Issue 330603004: Rename FaviconBitmapXxx to FaviconRawBitmapXxx (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix android Created 6 years, 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include "chrome/browser/ui/android/navigation_popup.h" 5 #include "chrome/browser/ui/android/navigation_popup.h"
6 6
7 #include "base/android/jni_string.h" 7 #include "base/android/jni_string.h"
8 #include "base/android/scoped_java_ref.h" 8 #include "base/android/scoped_java_ref.h"
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "chrome/browser/browser_process.h" 10 #include "chrome/browser/browser_process.h"
(...skipping 30 matching lines...) Expand all
41 jobject obj, 41 jobject obj,
42 jstring jurl) { 42 jstring jurl) {
43 Profile* profile = g_browser_process->profile_manager()->GetLastUsedProfile(); 43 Profile* profile = g_browser_process->profile_manager()->GetLastUsedProfile();
44 FaviconService* favicon_service = FaviconServiceFactory::GetForProfile( 44 FaviconService* favicon_service = FaviconServiceFactory::GetForProfile(
45 profile, Profile::EXPLICIT_ACCESS); 45 profile, Profile::EXPLICIT_ACCESS);
46 if (!favicon_service) 46 if (!favicon_service)
47 return; 47 return;
48 GURL url(base::android::ConvertJavaStringToUTF16(env, jurl)); 48 GURL url(base::android::ConvertJavaStringToUTF16(env, jurl));
49 // TODO(tedchoc): Request higher favicons based on screen density instead of 49 // TODO(tedchoc): Request higher favicons based on screen density instead of
50 // hardcoding kFaviconSize. 50 // hardcoding kFaviconSize.
51 favicon_service->GetFaviconImageForURL( 51 favicon_service->GetFaviconImageForPageURL(
52 FaviconService::FaviconForURLParams( 52 FaviconService::FaviconForPageURLParams(
53 url, favicon_base::FAVICON, gfx::kFaviconSize), 53 url, favicon_base::FAVICON, gfx::kFaviconSize),
54 base::Bind(&NavigationPopup::OnFaviconDataAvailable, 54 base::Bind(&NavigationPopup::OnFaviconDataAvailable,
55 base::Unretained(this), 55 base::Unretained(this),
56 url), 56 url),
57 &cancelable_task_tracker_); 57 &cancelable_task_tracker_);
58 } 58 }
59 59
60 void NavigationPopup::OnFaviconDataAvailable( 60 void NavigationPopup::OnFaviconDataAvailable(
61 GURL navigation_entry_url, 61 GURL navigation_entry_url,
62 const favicon_base::FaviconImageResult& image_result) { 62 const favicon_base::FaviconImageResult& image_result) {
(...skipping 24 matching lines...) Expand all
87 87
88 static jlong Init(JNIEnv* env, jobject obj) { 88 static jlong Init(JNIEnv* env, jobject obj) {
89 NavigationPopup* popup = new NavigationPopup(env, obj); 89 NavigationPopup* popup = new NavigationPopup(env, obj);
90 return reinterpret_cast<intptr_t>(popup); 90 return reinterpret_cast<intptr_t>(popup);
91 } 91 }
92 92
93 // static 93 // static
94 bool NavigationPopup::RegisterNavigationPopup(JNIEnv* env) { 94 bool NavigationPopup::RegisterNavigationPopup(JNIEnv* env) {
95 return RegisterNativesImpl(env); 95 return RegisterNativesImpl(env);
96 } 96 }
OLDNEW
« no previous file with comments | « chrome/browser/sync/test/integration/bookmarks_helper.cc ('k') | chrome/browser/ui/ash/launcher/launcher_favicon_loader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698