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 #include "jni/DistilledPagePrefs_jni.h" | |
| 10 | |
| 11 namespace dom_distiller { | |
| 12 namespace android { | |
| 13 | |
| 14 DistilledPagePrefsAndroid::DistilledPagePrefsAndroid( | |
| 15 JNIEnv* env, | |
| 16 jobject obj, | |
| 17 DistilledPagePrefs* distillerPagePrefsPtr) | |
| 18 : distilled_page_prefs_(distillerPagePrefsPtr) { | |
| 19 } | |
| 20 | |
| 21 DistilledPagePrefsAndroid::~DistilledPagePrefsAndroid() { | |
| 22 } | |
| 23 | |
| 24 void DistilledPagePrefsAndroid::SetTheme(JNIEnv* env, jobject obj, jint theme) { | |
| 25 distilled_page_prefs_->SetTheme((DistilledPagePrefs::Theme)theme); | |
|
nyquist
2014/07/09 23:49:04
I think a whitespace is missing after the cast. Co
sunangel
2014/07/10 14:31:53
not missing a space. added a space, ran git cl for
| |
| 26 } | |
| 27 | |
| 28 jint DistilledPagePrefsAndroid::GetThemeValue(JNIEnv* env, jobject obj) { | |
| 29 return (int)distilled_page_prefs_->GetTheme(); | |
|
nyquist
2014/07/09 23:49:04
same as above about whitespace
sunangel
2014/07/10 14:31:53
same as above.
On 2014/07/09 23:49:04, nyquist wro
| |
| 30 } | |
| 31 | |
| 32 jlong Init(JNIEnv* env, jobject obj, jlong distilledPagePrefsPtr) { | |
| 33 DistilledPagePrefs* distilledPagePrefs = | |
| 34 reinterpret_cast<DistilledPagePrefs*>(distilledPagePrefsPtr); | |
| 35 DistilledPagePrefsAndroid* distilled_page_prefs_android = | |
| 36 new DistilledPagePrefsAndroid(env, obj, distilledPagePrefs); | |
| 37 return reinterpret_cast<intptr_t>(distilled_page_prefs_android); | |
| 38 } | |
| 39 | |
| 40 bool DistilledPagePrefsAndroid::Register(JNIEnv* env) { | |
| 41 return RegisterNativesImpl(env); | |
| 42 } | |
| 43 | |
| 44 } // namespace android | |
| 45 } // namespace dom_distiller | |
| OLD | NEW |