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 "components/dom_distiller/core/dom_distiller_service_android.h" | |
6 | |
7 #include "base/android/jni_android.h" | |
8 | |
nyquist
2014/07/08 01:02:34
remove empty line
sunangel
2014/07/08 20:41:00
Done.
| |
9 #include "components/dom_distiller/core/distilled_page_prefs.h" | |
10 #include "components/dom_distiller/core/distilled_page_prefs_android.h" | |
11 #include "components/dom_distiller/core/dom_distiller_service.h" | |
12 | |
nyquist
2014/07/08 01:02:34
remove empty line
sunangel
2014/07/08 20:41:00
Done.
| |
13 #include "jni/DomDistillerService_jni.h" | |
14 | |
15 namespace dom_distiller{ | |
16 namespace android { | |
17 | |
18 DomDistillerServiceAndroid::DomDistillerServiceAndroid( | |
19 dom_distiller::DomDistillerService* service):service_(service) { | |
nyquist
2014/07/08 01:02:34
See style guide for how this should be written:
ht
sunangel
2014/07/08 20:41:00
Done.
| |
20 JNIEnv* env = base::android::AttachCurrentThread(); | |
21 base::android::ScopedJavaLocalRef<jobject> local_java_ref = | |
22 Java_DomDistillerService_create(env, reinterpret_cast<intptr_t>(this)); | |
23 java_ref_.Reset(env, local_java_ref.obj()); | |
24 } | |
25 | |
26 DomDistillerServiceAndroid::~DomDistillerServiceAndroid() {} | |
27 | |
28 /** | |
29 * Returns native pointer to native distilled page preferences registered with | |
30 * dom_distiller_service. | |
31 */ | |
32 jlong DomDistillerServiceAndroid::GetDistilledPagePrefsPointer(JNIEnv* env, | |
33 jobject obj) { | |
nyquist
2014/07/08 01:02:34
indent seems to be off?
sunangel
2014/07/08 20:41:00
Done.
| |
34 return reinterpret_cast<intptr_t>(service_->GetDistilledPagePrefs()); | |
35 } | |
36 | |
37 bool DomDistillerServiceAndroid::Register(JNIEnv* env) { | |
38 return RegisterNativesImpl(env); | |
39 } | |
40 | |
41 } // namespace android | |
42 } // namespace dom_distiller | |
OLD | NEW |