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

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

Issue 2754203004: 📰 Add tests for context menu usage (Closed)
Patch Set: y Created 3 years, 9 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
« no previous file with comments | « chrome/browser/android/chrome_jni_registrar.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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"
11 #include "base/android/jni_string.h" 11 #include "base/android/jni_string.h"
12 #include "base/android/scoped_java_ref.h" 12 #include "base/android/scoped_java_ref.h"
13 #include "chrome/browser/browser_process.h" 13 #include "chrome/browser/browser_process.h"
14 #include "chrome/browser/ntp_tiles/chrome_most_visited_sites_factory.h" 14 #include "chrome/browser/ntp_tiles/chrome_most_visited_sites_factory.h"
15 #include "chrome/browser/profiles/profile.h" 15 #include "chrome/browser/profiles/profile.h"
16 #include "chrome/browser/profiles/profile_android.h" 16 #include "chrome/browser/profiles/profile_android.h"
17 #include "chrome/browser/thumbnails/thumbnail_list_source.h" 17 #include "chrome/browser/thumbnails/thumbnail_list_source.h"
18 #include "components/ntp_tiles/metrics.h" 18 #include "components/ntp_tiles/metrics.h"
19 #include "components/ntp_tiles/most_visited_sites.h" 19 #include "components/ntp_tiles/most_visited_sites.h"
20 #include "components/rappor/rappor_service_impl.h" 20 #include "components/rappor/rappor_service_impl.h"
21 #include "jni/MostVisitedSitesBridge_jni.h"
21 #include "jni/MostVisitedSites_jni.h" 22 #include "jni/MostVisitedSites_jni.h"
22 #include "ui/gfx/android/java_bitmap.h" 23 #include "ui/gfx/android/java_bitmap.h"
23 24
24 using base::android::AttachCurrentThread; 25 using base::android::AttachCurrentThread;
25 using base::android::ConvertJavaStringToUTF8; 26 using base::android::ConvertJavaStringToUTF8;
26 using base::android::ConvertUTF8ToJavaString; 27 using base::android::ConvertUTF8ToJavaString;
27 using base::android::JavaParamRef; 28 using base::android::JavaParamRef;
28 using base::android::ScopedJavaGlobalRef; 29 using base::android::ScopedJavaGlobalRef;
29 using base::android::ScopedJavaLocalRef; 30 using base::android::ScopedJavaLocalRef;
30 using base::android::ToJavaArrayOfStrings; 31 using base::android::ToJavaArrayOfStrings;
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 } 166 }
166 167
167 static jlong Init(JNIEnv* env, 168 static jlong Init(JNIEnv* env,
168 const JavaParamRef<jobject>& obj, 169 const JavaParamRef<jobject>& obj,
169 const JavaParamRef<jobject>& jprofile) { 170 const JavaParamRef<jobject>& jprofile) {
170 MostVisitedSitesBridge* most_visited_sites = 171 MostVisitedSitesBridge* most_visited_sites =
171 new MostVisitedSitesBridge( 172 new MostVisitedSitesBridge(
172 ProfileAndroid::FromProfileAndroid(jprofile)); 173 ProfileAndroid::FromProfileAndroid(jprofile));
173 return reinterpret_cast<intptr_t>(most_visited_sites); 174 return reinterpret_cast<intptr_t>(most_visited_sites);
174 } 175 }
OLDNEW
« no previous file with comments | « chrome/browser/android/chrome_jni_registrar.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698