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 051d821c2e4ca8de1388efb579659f40cbe52b4d..914ba7b968a85f0c777770307f382ac9079b6a97 100644 |
--- a/components/dom_distiller/core/distilled_page_prefs_android.cc |
+++ b/components/dom_distiller/core/distilled_page_prefs_android.cc |
@@ -42,6 +42,16 @@ jint DistilledPagePrefsAndroid::GetTheme(JNIEnv* env, jobject obj) { |
return (int) distilled_page_prefs_->GetTheme(); |
} |
+void DistilledPagePrefsAndroid::SetFontScaling(JNIEnv* env, |
+ jobject obj, |
+ jfloat scaling) { |
+ distilled_page_prefs_->SetFontScaling(static_cast<float>(scaling)); |
+} |
+ |
+jfloat DistilledPagePrefsAndroid::GetFontScaling(JNIEnv* env, jobject obj) { |
+ return distilled_page_prefs_->GetFontScaling(); |
+} |
+ |
jlong Init(JNIEnv* env, jobject obj, jlong distilled_page_prefs_ptr) { |
DistilledPagePrefs* distilled_page_prefs = |
reinterpret_cast<DistilledPagePrefs*>(distilled_page_prefs_ptr); |
@@ -97,6 +107,13 @@ void DistilledPagePrefsObserverAndroid::OnChangeTheme( |
env, java_ref_.obj(), (int)new_theme); |
} |
+void DistilledPagePrefsObserverAndroid::OnChangeFontScaling( |
+ float scaling) { |
+ JNIEnv* env = base::android::AttachCurrentThread(); |
+ Java_DistilledPagePrefsObserverWrapper_onChangeFontScaling( |
+ env, java_ref_.obj(), scaling); |
+} |
+ |
jlong InitObserverAndroid(JNIEnv* env, jobject obj) { |
DistilledPagePrefsObserverAndroid* observer_android = |
new DistilledPagePrefsObserverAndroid(env, obj); |