Chromium Code Reviews| 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/distilled_page_prefs_android.h" | |
| 6 | |
| 7 #include "components/dom_distiller/core/distilled_page_prefs.h" | |
| 8 #include "components/dom_distiller/core/dom_distiller_service.h" | |
| 9 | |
|
nyquist
2014/07/08 01:02:34
remove empty line
sunangel
2014/07/08 20:40:59
Done.
| |
| 10 #include "jni/DistilledPagePrefs_jni.h" | |
| 11 | |
|
nyquist
2014/07/08 01:02:34
add namespace dom_distiller and android.
sunangel
2014/07/08 20:40:59
Done.
| |
| 12 DistilledPagePrefsAndroid::DistilledPagePrefsAndroid(JNIEnv* env, jobject obj, | |
| 13 dom_distiller::DistilledPagePrefs* ptr):distilled_page_prefs_(ptr) {} | |
|
nyquist
2014/07/08 01:02:34
call the parameter for distilled_page_prefs.
See
sunangel
2014/07/08 20:40:59
Done.
| |
| 14 | |
| 15 DistilledPagePrefsAndroid::~DistilledPagePrefsAndroid() {} | |
| 16 | |
| 17 void DistilledPagePrefsAndroid::SetTheme(JNIEnv* env, | |
| 18 jobject obj, | |
| 19 jint color_mode) { | |
|
nyquist
2014/07/08 01:02:34
s/color_mode/theme/
sunangel
2014/07/08 20:40:58
Done.
| |
| 20 distilled_page_prefs_->SetTheme( | |
| 21 (dom_distiller::DistilledPagePrefs::Theme)color_mode); | |
|
nyquist
2014/07/08 01:02:34
whitespace after cast.
sunangel
2014/07/08 20:40:59
Done.
| |
| 22 } | |
| 23 | |
| 24 jlong Init(JNIEnv* env, jobject obj, jlong servicePtr) { | |
|
nyquist
2014/07/08 01:02:34
This is not the service pointer anymore. Rename to
sunangel
2014/07/08 20:40:59
Done.
| |
| 25 dom_distiller::DistilledPagePrefs* ptr = | |
|
nyquist
2014/07/08 01:02:34
s/ptr/distilledPagePrefs/
sunangel
2014/07/08 20:40:59
Done.
| |
| 26 reinterpret_cast<dom_distiller::DistilledPagePrefs*>(servicePtr); | |
| 27 DistilledPagePrefsAndroid* dom_distiller_service_android = | |
|
nyquist
2014/07/08 01:02:33
distilled_page_prefs_android
sunangel
2014/07/08 20:40:59
Done.
| |
| 28 new DistilledPagePrefsAndroid(env, obj, ptr); | |
| 29 return reinterpret_cast<intptr_t>(dom_distiller_service_android); | |
| 30 } | |
| 31 | |
| 32 bool DistilledPagePrefsAndroid::Register(JNIEnv* env) { | |
| 33 return RegisterNativesImpl(env); | |
| 34 } | |
| OLD | NEW |