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

Unified Diff: components/dom_distiller/core/distilled_page_prefs_observer_wrapper.h

Issue 403323005: Observer Support for DistilledPagePrefs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: formatting 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/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_

Powered by Google App Engine
This is Rietveld 408576698