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

Side by Side Diff: components/dom_distiller/core/dom_distiller_service_android.cc

Issue 340403004: Java wrapper for DistilledPagePrefs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: commenting, updated theme_list with Susan's patch 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 "components/dom_distiller/core/dom_distiller_service_android.h"
6
7 #include "base/android/jni_android.h"
8 #include "components/dom_distiller/core/distilled_page_prefs.h"
9 #include "components/dom_distiller/core/distilled_page_prefs_android.h"
10 #include "components/dom_distiller/core/dom_distiller_service.h"
11 #include "jni/DomDistillerService_jni.h"
12
13 namespace dom_distiller {
14 namespace android {
15
16 DomDistillerServiceAndroid::DomDistillerServiceAndroid(
17 DomDistillerService* service)
18 : service_(service) {
19 JNIEnv* env = base::android::AttachCurrentThread();
20 base::android::ScopedJavaLocalRef<jobject> local_java_ref =
21 Java_DomDistillerService_create(env, reinterpret_cast<intptr_t>(this));
22 java_ref_.Reset(env, local_java_ref.obj());
23 }
24
25 DomDistillerServiceAndroid::~DomDistillerServiceAndroid() {
26 }
27
28 /**
29 * Returns native pointer to native DistilledPagePrefs registered with
nyquist 2014/07/14 18:06:25 Move this comment to the header file.
sunangel 2014/07/15 15:39:51 Done.
30 * DomDistillerService.
31 */
32 jlong DomDistillerServiceAndroid::GetDistilledPagePrefsPtr(JNIEnv* env,
33 jobject obj) {
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
OLDNEW
« no previous file with comments | « components/dom_distiller/core/dom_distiller_service_android.h ('k') | components/dom_distiller/core/theme_list.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698