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

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

Issue 340403004: Java wrapper for DistilledPagePrefs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: namespaces to classes, native init, enum 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/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..582571e7e12838861fa1e7b5744041f36fd838f5
--- /dev/null
+++ b/components/dom_distiller/android/java/src/org/chromium/components/dom_distiller/core/DistilledPagePrefs.java
@@ -0,0 +1,27 @@
+// 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;
+
+/**
+ * Wrapper for the dom_distiller::reader_mode_preferences.
nyquist 2014/07/08 01:02:33 "Wrapper for the native dom_distiller::DistilledPa
sunangel 2014/07/08 20:40:57 Done.
+ */
+public final class DistilledPagePrefs {
+
+ private final long mDistilledPagePrefsAndroid;
+
+ DistilledPagePrefs(long nativeReaderModePrefs) {
nyquist 2014/07/08 01:02:33 distilledPagePrefsPtr
sunangel 2014/07/08 20:40:57 Done.
+ mDistilledPagePrefsAndroid = nativeInit(nativeReaderModePrefs);
+ }
+
+ public void setTheme(Theme theme) {
nyquist 2014/07/08 01:02:33 Would you ever want to get the current theme in th
sunangel 2014/07/08 20:40:57 I added a getter. On 2014/07/08 01:02:33, nyquist
+ nativeSetTheme(mDistilledPagePrefsAndroid, theme.asNativeEnum());
+ }
+
nyquist 2014/07/08 01:02:33 remove one empty line
sunangel 2014/07/08 20:40:58 Done.
+
+ private native long nativeInit(long distilledPagePref);
nyquist 2014/07/08 01:02:33 distilledPagePrefsPtr
sunangel 2014/07/08 20:40:58 Done.
+ private native void nativeSetTheme(long nativeDistilledPagePrefsAndroid,
+ int color_mode);
nyquist 2014/07/08 01:02:33 int theme
sunangel 2014/07/08 20:40:57 Done.
+}
+
nyquist 2014/07/08 01:02:33 remove empty line (just go to the last } and press
sunangel 2014/07/08 20:40:58 Done.

Powered by Google App Engine
This is Rietveld 408576698