OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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/dom_distiller/dom_distiller_service_factory_android.h" | 5 #include "chrome/browser/dom_distiller/dom_distiller_service_factory_android.h" |
6 | 6 |
7 #include "base/android/jni_android.h" | 7 #include "base/android/jni_android.h" |
8 #include "chrome/browser/dom_distiller/dom_distiller_service_factory.h" | 8 #include "chrome/browser/dom_distiller/dom_distiller_service_factory.h" |
9 #include "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
10 #include "chrome/browser/profiles/profile_android.h" | 10 #include "chrome/browser/profiles/profile_android.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 ProfileAndroid::FromProfileAndroid(j_profile)); | 25 ProfileAndroid::FromProfileAndroid(j_profile)); |
26 DomDistillerServiceAndroid* service_android = | 26 DomDistillerServiceAndroid* service_android = |
27 new DomDistillerServiceAndroid(service); | 27 new DomDistillerServiceAndroid(service); |
28 return ScopedJavaLocalRef<jobject>(service_android->java_ref_); | 28 return ScopedJavaLocalRef<jobject>(service_android->java_ref_); |
29 } | 29 } |
30 | 30 |
31 bool DomDistillerServiceFactoryAndroid::Register(JNIEnv* env) { | 31 bool DomDistillerServiceFactoryAndroid::Register(JNIEnv* env) { |
32 return RegisterNativesImpl(env); | 32 return RegisterNativesImpl(env); |
33 } | 33 } |
34 | 34 |
35 ScopedJavaLocalRef<jobject> GetForProfile(JNIEnv* env, | 35 ScopedJavaLocalRef<jobject> GetForProfile( |
36 jclass clazz, | 36 JNIEnv* env, |
37 jobject j_profile) { | 37 const JavaParamRef<jclass>& clazz, |
| 38 const JavaParamRef<jobject>& j_profile) { |
38 return DomDistillerServiceFactoryAndroid::GetForProfile(env, clazz, | 39 return DomDistillerServiceFactoryAndroid::GetForProfile(env, clazz, |
39 j_profile); | 40 j_profile); |
40 } | 41 } |
41 | 42 |
42 } // namespace android | 43 } // namespace android |
43 } // namespace dom_distiller | 44 } // namespace dom_distiller |
OLD | NEW |