Chromium Code Reviews| Index: components/dom_distiller/core/distilled_page_prefs_android.cc |
| diff --git a/components/dom_distiller/core/distilled_page_prefs_android.cc b/components/dom_distiller/core/distilled_page_prefs_android.cc |
| index e6fb247376cc241fd7e981b7ff9e90e352ad0fd7..7880540159dc021c9e25d0c01009841c6944c8e1 100644 |
| --- a/components/dom_distiller/core/distilled_page_prefs_android.cc |
| +++ b/components/dom_distiller/core/distilled_page_prefs_android.cc |
| @@ -22,6 +22,17 @@ DistilledPagePrefsAndroid::DistilledPagePrefsAndroid( |
| DistilledPagePrefsAndroid::~DistilledPagePrefsAndroid() { |
| } |
| +void DistilledPagePrefsAndroid::SetFontFamily(JNIEnv* env, |
| + jobject obj, |
| + jint font_family) { |
| + distilled_page_prefs_->SetFontFamily( |
| + static_cast<DistilledPagePrefs::FontFamily>(font_family)); |
|
Yaron
2014/08/13 01:58:47
indent 2 more
sunangel
2014/08/13 18:09:04
Done.
|
| +} |
| + |
| +jint DistilledPagePrefsAndroid::GetFontFamily(JNIEnv* env, jobject obj) { |
| + return (int)distilled_page_prefs_->GetFontFamily(); |
|
Yaron
2014/08/13 01:58:47
space after "(int)"
sunangel
2014/08/13 18:09:04
Done.
|
| +} |
| + |
| void DistilledPagePrefsAndroid::SetTheme(JNIEnv* env, jobject obj, jint theme) { |
| distilled_page_prefs_->SetTheme((DistilledPagePrefs::Theme)theme); |
| } |
| @@ -71,6 +82,13 @@ void DistilledPagePrefsObserverAndroid::DestroyObserverAndroid(JNIEnv* env, |
| delete this; |
| } |
| +void DistilledPagePrefsObserverAndroid::OnChangeFontFamily( |
| + DistilledPagePrefs::FontFamily new_font_family) { |
| + JNIEnv* env = base::android::AttachCurrentThread(); |
| + Java_DistilledPagePrefsObserverWrapper_onChangeFontFamily( |
| + env, java_ref_.obj(), (int)new_font_family); |
| +} |
| + |
| void DistilledPagePrefsObserverAndroid::OnChangeTheme( |
| DistilledPagePrefs::Theme new_theme) { |
| JNIEnv* env = base::android::AttachCurrentThread(); |