Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(61)

Unified Diff: components/dom_distiller/android/java/src/org/chromium/components/dom_distiller/core/DomDistillerService.java

Issue 340403004: Java wrapper for DistilledPagePrefs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: modified DEPS for test dependencies Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..e5b5cb8cddcadbab29f70aa79122bcbc85cd08de
--- /dev/null
+++ b/components/dom_distiller/android/java/src/org/chromium/components/dom_distiller/core/DomDistillerService.java
@@ -0,0 +1,38 @@
+// 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 native dom_distiller::DomDistillerService.
+ */
+@JNINamespace("dom_distiller::android")
+public final class DomDistillerService {
+
+ private final long mDomDistillerServiceAndroid;
+ private final DistilledPagePrefs mDistilledPagePrefs;
+
+ private DomDistillerService(long nativeDomDistillerAndroidServicePtr) {
+ mDomDistillerServiceAndroid = nativeDomDistillerAndroidServicePtr;
+ mDistilledPagePrefs = new DistilledPagePrefs(
+ nativeGetDistilledPagePrefsPtr(mDomDistillerServiceAndroid));
+ }
+
+ public DistilledPagePrefs getDistilledPagePrefs() {
+ return mDistilledPagePrefs;
+ }
+
+ @CalledByNative
+ private static DomDistillerService create(long nativeDomDistillerServiceAndroid) {
+ ThreadUtils.assertOnUiThread();
+ return new DomDistillerService(nativeDomDistillerServiceAndroid);
+ }
+
+ private static native long nativeGetDistilledPagePrefsPtr(
+ long nativeDomDistillerServiceAndroid);
+}

Powered by Google App Engine
This is Rietveld 408576698