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 |
new file mode 100644 |
index 0000000000000000000000000000000000000000..05961a72cda90ae95716d2eb924ee41d776d7b0f |
--- /dev/null |
+++ b/components/dom_distiller/android/java/src/org/chromium/components/dom_distiller/core/DistilledPagePrefs.java |
@@ -0,0 +1,35 @@ |
+// Copyright 2014 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+package org.chromium.components.dom_distiller.core; |
+ |
+import org.chromium.base.JNINamespace; |
+ |
+/** |
+ * Wrapper for the dom_distiller::DistilledPagePrefs. |
+ */ |
+@JNINamespace("dom_distiller::android") |
+public final class DistilledPagePrefs { |
+ |
+ private final long mDistilledPagePrefsAndroid; |
+ |
+ DistilledPagePrefs(long distilledPagePrefsPtr) { |
+ mDistilledPagePrefsAndroid = nativeInit(distilledPagePrefsPtr); |
+ } |
+ |
+ public void setTheme(Theme theme) { |
+ nativeSetTheme(mDistilledPagePrefsAndroid, theme.asNativeEnum()); |
nyquist
2014/07/09 23:49:04
Nit: How would you feel about adding a TODO for ad
sunangel
2014/07/10 14:31:52
It already updates across tabs ...I think it's bec
nyquist
2014/07/10 15:59:58
I was thinking about the UI, not the distilled pag
sunangel
2014/07/10 20:19:55
okay, to do added.
On 2014/07/10 15:59:58, nyquist
|
+ } |
+ |
+ public Theme getTheme() { |
+ return Theme.getThemeForValue( |
+ nativeGetThemeValue(mDistilledPagePrefsAndroid)); |
+ } |
+ |
+ private native long nativeInit(long distilledPagePrefPtr); |
+ private native void nativeSetTheme(long nativeDistilledPagePrefsAndroid, |
+ int theme); |
+ private native int nativeGetThemeValue( |
+ long nativeDistilledPagePrefsAndroid); |
+} |