Index: components/dom_distiller/core/distilled_page_prefs_android.h |
diff --git a/components/dom_distiller/core/distilled_page_prefs_android.h b/components/dom_distiller/core/distilled_page_prefs_android.h |
index baf7398065f37a8c5039dd7b28ebf5b836d1cb4b..6f0b1c8d8dfc692f8a86c059113bd0b746cd9de6 100644 |
--- a/components/dom_distiller/core/distilled_page_prefs_android.h |
+++ b/components/dom_distiller/core/distilled_page_prefs_android.h |
@@ -17,11 +17,13 @@ class DistilledPagePrefsAndroid { |
public: |
DistilledPagePrefsAndroid(JNIEnv* env, |
jobject obj, |
- DistilledPagePrefs* distillerPagePrefsPtr); |
+ DistilledPagePrefs* distilled_page_prefs_ptr); |
virtual ~DistilledPagePrefsAndroid(); |
static bool Register(JNIEnv* env); |
void SetTheme(JNIEnv* env, jobject obj, jint theme); |
jint GetTheme(JNIEnv* env, jobject obj); |
+ void AddObserver(JNIEnv* env, jobject obj, jlong obs); |
+ void RemoveObserver(JNIEnv* env, jobject obj, jlong obs); |
private: |
DistilledPagePrefs* distilled_page_prefs_; |
@@ -29,6 +31,20 @@ class DistilledPagePrefsAndroid { |
DISALLOW_COPY_AND_ASSIGN(DistilledPagePrefsAndroid); |
}; |
+class DistilledPagePrefsObserverAndroid : public DistilledPagePrefs::Observer { |
+ public: |
+ DistilledPagePrefsObserverAndroid(JNIEnv* env, jobject obj); |
+ virtual ~DistilledPagePrefsObserverAndroid(); |
+ |
+ // DistilledPagePrefs::Observer implementation. |
+ virtual void OnChangeTheme(DistilledPagePrefs::Theme new_theme) OVERRIDE; |
+ |
+ virtual void DestroyObserverAndroid(JNIEnv* env, jobject obj); |
+ |
+ private: |
+ base::android::ScopedJavaGlobalRef<jobject> java_ref_; |
+}; |
+ |
} // namespace android |
} // namespace dom_distiller |