Index: components/dom_distiller/android/java/src/org/chromium/components/dom_distiller/core/DomDistillerService.java |
diff --git a/components/dom_distiller/android/java/src/org/chromium/components/dom_distiller/core/DomDistillerService.java b/components/dom_distiller/android/java/src/org/chromium/components/dom_distiller/core/DomDistillerService.java |
new file mode 100644 |
index 0000000000000000000000000000000000000000..d58d08f457a13745cf5241247d39ff5b59cfd1b5 |
--- /dev/null |
+++ b/components/dom_distiller/android/java/src/org/chromium/components/dom_distiller/core/DomDistillerService.java |
@@ -0,0 +1,41 @@ |
+// 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.CalledByNative; |
+import org.chromium.base.JNINamespace; |
+import org.chromium.base.ThreadUtils; |
+ |
+/** |
+ * Wrapper for the dom_distiller::reader_mode_preferences. |
nyquist
2014/07/08 01:02:33
"Wrapper for the native dom_distiller::DomDistille
sunangel
2014/07/08 20:40:58
Done.
|
+ */ |
+@JNINamespace("dom_distiller::android") |
+public final class DomDistillerService { |
+ |
+ private final long mDomDistillerServiceAndroid; |
+ private final DistilledPagePrefs mDistilledPagePrefs; |
+ |
+ DomDistillerService(long nativeDomDistillerAndroidServicePtr) { |
nyquist
2014/07/08 01:02:33
private
sunangel
2014/07/08 20:40:58
Done.
|
+ mDomDistillerServiceAndroid = |
+ nativeDomDistillerAndroidServicePtr; |
+ mDistilledPagePrefs = new DistilledPagePrefs( |
+ nativeGetDistilledPagePrefsPointer( |
+ mDomDistillerServiceAndroid)); |
+ } |
+ |
+ public DistilledPagePrefs getDistilledPagePrefs() { |
+ return mDistilledPagePrefs; |
+ } |
+ |
+ @CalledByNative |
+ private static DomDistillerService create( |
+ long nativeDomDistillerServiceAndroid) { |
+ ThreadUtils.assertOnUiThread(); |
+ return new DomDistillerService(nativeDomDistillerServiceAndroid); |
+ } |
+ |
+ private static native long nativeGetDistilledPagePrefsPointer( |
nyquist
2014/07/08 01:02:33
Nit: s/Pointer/Ptr/
sunangel
2014/07/08 20:40:58
Done.
|
+ long nativeDomDistillerServiceAndroid); |
+} |