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

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: DomDistillerService Java wrapper Created 6 years, 6 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.h"
6 #include "components/dom_distiller/core/dom_distiller_service_android.h"
7 #include "components/dom_distiller/core/reader_mode_preferences.h"
8
9 #include "jni/DomDistillerService_jni.h"
10
11 DomDistillerServiceAndroid::DomDistillerServiceAndroid(
12 JNIEnv* env,
13 jobject obj,
14 dom_distiller::DomDistillerService* ptr) {
15 service_ = ptr;
16 }
17
18 jlong Init(JNIEnv* env, jobject obj, jlong servicePtr) {
19 dom_distiller::DomDistillerService* s =
20 reinterpret_cast<dom_distiller::DomDistillerService*>(servicePtr);
21 DomDistillerServiceAndroid* dom_distiller_service_android =
22 new DomDistillerServiceAndroid(env, obj, s);
23 return reinterpret_cast<intptr_t>(dom_distiller_service_android);
24 }
25
26 jlong DomDistillerServiceAndroid::GetReaderModePrefsPointer(JNIEnv* env,
27 jobject obj) {
28 return reinterpret_cast<intptr_t>(service_->GetReaderModePrefs());
robliao 2014/06/26 18:42:15 Worth commenting why this works and where this liv
sunangel 2014/06/27 16:27:25 Done.
29 }
30
31 bool DomDistillerServiceAndroid::Register(JNIEnv* env) {
32 return RegisterNativesImpl(env);
33 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698