Index: components/dom_distiller/core/distilled_page_prefs_observer_wrapper.h |
diff --git a/components/dom_distiller/core/distilled_page_prefs_observer_wrapper.h b/components/dom_distiller/core/distilled_page_prefs_observer_wrapper.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..462424fe3b8444bc6c129eb48f5a4d0dc7c6880b |
--- /dev/null |
+++ b/components/dom_distiller/core/distilled_page_prefs_observer_wrapper.h |
@@ -0,0 +1,31 @@ |
+// 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. |
+ |
+#ifndef COMPONENTS_DOM_DISTILLER_CORE_DISTILLED_PAGE_PREFS_OBSERVER_WRAPPER_H_ |
+#define COMPONENTS_DOM_DISTILLER_CORE_DISTILLED_PAGE_PREFS_OBSERVER_WRAPPER_H_ |
+ |
+#include <jni.h> |
+ |
+#include "base/android/scoped_java_ref.h" |
+#include "components/dom_distiller/core/distilled_page_prefs.h" |
+ |
+namespace dom_distiller { |
+ |
+class DistilledPagePrefsObserverWrapper : public DistilledPagePrefs::Observer { |
nyquist
2014/07/22 22:51:37
How about DistilledPagePrefsObserverAndroid?
sunangel
2014/07/23 16:22:04
Done.
|
+ public: |
+ DistilledPagePrefsObserverWrapper(JNIEnv* env, jobject obj); |
+ virtual ~DistilledPagePrefsObserverWrapper(); |
+ void Destroy(JNIEnv* env, jobject obj); |
+ static bool Register(JNIEnv* env); |
+ |
+ // DistilledPagePrefs::Observer |
+ virtual void OnChangeTheme(DistilledPagePrefs::Theme new_theme) OVERRIDE; |
+ |
+ private: |
+ base::android::ScopedJavaGlobalRef<jobject> java_ref_; |
+}; |
+ |
+} // namespace dom_distiller |
+ |
+#endif // COMPONENTS_DOM_DISTILLER_CORE_DISTILLED_PAGE_PREFS_OBSERVER_WRAPPER_H_ |