Index: components/dom_distiller/android/java/src/org/chromium/components/dom_distiller/core/DistilledPagePrefs.java |
diff --git a/components/dom_distiller/android/java/src/org/chromium/components/dom_distiller/core/DistilledPagePrefs.java b/components/dom_distiller/android/java/src/org/chromium/components/dom_distiller/core/DistilledPagePrefs.java |
index 8a448654b4ca1c963dbe34b768aa831cdbb1483d..6b35bc0a4a9d7800ce87b7cec207c2831a250d83 100644 |
--- a/components/dom_distiller/android/java/src/org/chromium/components/dom_distiller/core/DistilledPagePrefs.java |
+++ b/components/dom_distiller/android/java/src/org/chromium/components/dom_distiller/core/DistilledPagePrefs.java |
@@ -26,6 +26,7 @@ public final class DistilledPagePrefs { |
public interface Observer { |
void onChangeFontFamily(FontFamily font); |
void onChangeTheme(Theme theme); |
+ void onChangeFontScaling(float scaling); |
} |
/** |
@@ -51,6 +52,11 @@ public final class DistilledPagePrefs { |
mDistilledPagePrefsObserver.onChangeTheme(Theme.getThemeForValue(theme)); |
} |
+ @CalledByNative("DistilledPagePrefsObserverWrapper") |
+ private void onChangeFontScaling(float scaling) { |
+ mDistilledPagePrefsObserver.onChangeFontScaling(scaling); |
+ } |
+ |
public void destroy() { |
nativeDestroyObserverAndroid(mNativeDistilledPagePrefsObserverAndroidPtr); |
} |
@@ -113,6 +119,14 @@ public final class DistilledPagePrefs { |
return Theme.getThemeForValue(nativeGetTheme(mDistilledPagePrefsAndroid)); |
} |
+ public void setFontScaling(float scaling) { |
+ nativeSetFontScaling(mDistilledPagePrefsAndroid, scaling); |
+ } |
+ |
+ public float getFontScaling() { |
+ return nativeGetFontScaling(mDistilledPagePrefsAndroid); |
+ } |
+ |
private native long nativeInit(long distilledPagePrefPtr); |
private native void nativeSetFontFamily(long nativeDistilledPagePrefsAndroid, int fontFamily); |
@@ -123,6 +137,10 @@ public final class DistilledPagePrefs { |
private native int nativeGetTheme(long nativeDistilledPagePrefsAndroid); |
+ private native void nativeSetFontScaling(long nativeDistilledPagePrefsAndroid, float scaling); |
+ |
+ private native float nativeGetFontScaling(long nativeDistilledPagePrefsAndroid); |
+ |
private native void nativeAddObserver(long nativeDistilledPagePrefsAndroid, |
long nativeObserverPtr); |