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

Side by Side Diff: chrome/browser/android/ntp/most_visited_sites_bridge.cc

Issue 2069763003: Move ntp_tiles classes to namespace ntp_tiles. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/android/ntp/most_visited_sites_bridge.h" 5 #include "chrome/browser/android/ntp/most_visited_sites_bridge.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/android/jni_android.h" 9 #include "base/android/jni_android.h"
10 #include "base/android/jni_array.h" 10 #include "base/android/jni_array.h"
(...skipping 19 matching lines...) Expand all
30 #include "jni/MostVisitedSites_jni.h" 30 #include "jni/MostVisitedSites_jni.h"
31 #include "ui/gfx/android/java_bitmap.h" 31 #include "ui/gfx/android/java_bitmap.h"
32 #include "url/gurl.h" 32 #include "url/gurl.h"
33 33
34 using base::android::AttachCurrentThread; 34 using base::android::AttachCurrentThread;
35 using base::android::ConvertJavaStringToUTF8; 35 using base::android::ConvertJavaStringToUTF8;
36 using base::android::ScopedJavaGlobalRef; 36 using base::android::ScopedJavaGlobalRef;
37 using base::android::ScopedJavaLocalRef; 37 using base::android::ScopedJavaLocalRef;
38 using base::android::ToJavaArrayOfStrings; 38 using base::android::ToJavaArrayOfStrings;
39 using content::BrowserThread; 39 using content::BrowserThread;
40 using ntp_tiles::MostVisitedSites;
41 using ntp_tiles::MostVisitedSitesSupervisor;
40 using suggestions::SuggestionsServiceFactory; 42 using suggestions::SuggestionsServiceFactory;
41 43
42 namespace { 44 namespace {
43 45
44 void CallJavaWithBitmap( 46 void CallJavaWithBitmap(
45 std::unique_ptr<ScopedJavaGlobalRef<jobject>> j_callback, 47 std::unique_ptr<ScopedJavaGlobalRef<jobject>> j_callback,
46 bool is_local_thumbnail, 48 bool is_local_thumbnail,
47 const SkBitmap* bitmap) { 49 const SkBitmap* bitmap) {
48 JNIEnv* env = AttachCurrentThread(); 50 JNIEnv* env = AttachCurrentThread();
49 ScopedJavaLocalRef<jobject> j_bitmap; 51 ScopedJavaLocalRef<jobject> j_bitmap;
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 } 241 }
240 242
241 static jlong Init(JNIEnv* env, 243 static jlong Init(JNIEnv* env,
242 const JavaParamRef<jobject>& obj, 244 const JavaParamRef<jobject>& obj,
243 const JavaParamRef<jobject>& jprofile) { 245 const JavaParamRef<jobject>& jprofile) {
244 MostVisitedSitesBridge* most_visited_sites = 246 MostVisitedSitesBridge* most_visited_sites =
245 new MostVisitedSitesBridge( 247 new MostVisitedSitesBridge(
246 ProfileAndroid::FromProfileAndroid(jprofile)); 248 ProfileAndroid::FromProfileAndroid(jprofile));
247 return reinterpret_cast<intptr_t>(most_visited_sites); 249 return reinterpret_cast<intptr_t>(most_visited_sites);
248 } 250 }
OLDNEW
« no previous file with comments | « chrome/browser/android/ntp/most_visited_sites_bridge.h ('k') | chrome/browser/prefs/browser_prefs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698