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..b62f3a9cb2f1c084f9738315e148868b86967ba9 |
--- /dev/null |
+++ b/components/dom_distiller/core/distilled_page_prefs_observer_wrapper.h |
@@ -0,0 +1,29 @@ |
+// 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 { |
+ public: |
+ DistilledPagePrefsObserverWrapper(JNIEnv* env, jobject obj); |
+ virtual ~DistilledPagePrefsObserverWrapper(); |
+ void Destroy(JNIEnv* env, jobject obj); |
+ static bool Register(JNIEnv* env); |
+ virtual void OnChangeTheme(DistilledPagePrefs::Theme new_theme) OVERRIDE; |
robliao
2014/07/21 21:05:09
It's customary to separate the override and add a
sunangel
2014/07/21 22:43:55
Done.
|
+ |
+ private: |
+ base::android::ScopedJavaGlobalRef<jobject> java_ref_; |
+}; |
+ |
+} // namespace dom_distiller |
+ |
+#endif // COMPONENTS_DOM_DISTILLER_CORE_DISTILLED_PAGE_PREFS_OBSERVER_WRAPPER_H_ |