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

Side by Side Diff: chrome/browser/dom_distiller/dom_distiller_service_factory_android.cc

Issue 340403004: Java wrapper for DistilledPagePrefs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Formatting changes, added test 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 | Annotate | Revision Log
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "chrome/browser/dom_distiller/dom_distiller_service_factory_android.h"
6
7 #include "base/android/jni_android.h"
8 #include "base/android/jni_string.h"
nyquist 2014/07/09 23:49:04 Nit: is this needed?
sunangel 2014/07/10 14:31:52 Done.
9 #include "chrome/browser/dom_distiller/dom_distiller_service_factory.h"
10 #include "chrome/browser/profiles/profile.h"
nyquist 2014/07/09 23:49:04 Nit: is this needed?
sunangel 2014/07/10 14:31:52 Yes. On 2014/07/09 23:49:04, nyquist wrote:
11 #include "chrome/browser/profiles/profile_android.h"
12 #include "components/dom_distiller/core/dom_distiller_service_android.h"
13 #include "jni/DomDistillerServiceFactory_jni.h"
14
15 using base::android::ScopedJavaLocalRef;
16
17 namespace dom_distiller {
18 namespace android {
19
20 jobject DomDistillerServiceFactoryAndroid::GetForProfile(JNIEnv* env,
21 jclass clazz,
22 jobject j_profile) {
23 dom_distiller::DomDistillerService* service =
24 dom_distiller::DomDistillerServiceFactory::GetForBrowserContext(
25 ProfileAndroid::FromProfileAndroid(j_profile));
26 DomDistillerServiceAndroid* service_android =
27 new DomDistillerServiceAndroid(service);
28 return service_android->java_ref_.obj();
29 }
30
31 bool DomDistillerServiceFactoryAndroid::Register(JNIEnv* env) {
32 return RegisterNativesImpl(env);
33 }
34
35 jobject GetForProfile(JNIEnv* env, jclass clazz, jobject j_profile) {
36 return DomDistillerServiceFactoryAndroid::GetForProfile(
37 env, clazz, j_profile);
38 }
39
40 } // namespace android
41 } // namespace dom_distiller
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698