OLD | NEW |
---|---|
(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 "base/android/jni_android.h" | |
6 #include "base/android/jni_string.h" | |
7 | |
nyquist
2014/07/08 01:02:32
remove empty line
sunangel
2014/07/08 20:40:56
Done.
| |
8 #include "chrome/browser/dom_distiller/dom_distiller_service_factory.h" | |
9 #include "chrome/browser/dom_distiller/dom_distiller_service_factory_android.h" | |
nyquist
2014/07/08 01:02:32
this include should go at the top, and then an emp
sunangel
2014/07/08 20:40:56
Done.
| |
10 #include "chrome/browser/profiles/profile.h" | |
11 #include "chrome/browser/profiles/profile_android.h" | |
12 | |
nyquist
2014/07/08 01:02:32
remove empty line
sunangel
2014/07/08 20:40:57
Done.
| |
13 #include "components/dom_distiller/core/dom_distiller_service_android.h" | |
14 | |
nyquist
2014/07/08 01:02:32
remove empty line
sunangel
2014/07/08 20:40:57
Done.
| |
15 #include "jni/DomDistillerServiceFactory_jni.h" | |
16 | |
17 using base::android::ScopedJavaLocalRef; | |
18 | |
19 namespace dom_distiller{ | |
20 namespace android { | |
21 | |
22 jobject DomDistillerServiceFactoryAndroid::GetForProfile( | |
23 JNIEnv* env, jclass clazz, jobject j_profile) { | |
24 dom_distiller::DomDistillerService* service = | |
25 dom_distiller::DomDistillerServiceFactory::GetForBrowserContext( | |
26 ProfileAndroid::FromProfileAndroid(j_profile)); | |
27 DomDistillerServiceAndroid* d = new DomDistillerServiceAndroid(service); | |
nyquist
2014/07/08 01:02:32
service_android
sunangel
2014/07/08 20:40:57
Done.
| |
28 return d->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 | |
OLD | NEW |