Index: components/dom_distiller/core/dom_distiller_service_android.h |
diff --git a/components/dom_distiller/core/dom_distiller_service_android.h b/components/dom_distiller/core/dom_distiller_service_android.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..834ae607833b4ec4014adbbafc469c4bb84a68bb |
--- /dev/null |
+++ b/components/dom_distiller/core/dom_distiller_service_android.h |
@@ -0,0 +1,39 @@ |
+// 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_DOM_DISTILLER_SERVICE_ANDROID_H_ |
+#define COMPONENTS_DOM_DISTILLER_CORE_DOM_DISTILLER_SERVICE_ANDROID_H_ |
+ |
+#include <jni.h> |
+ |
+#include "base/android/scoped_java_ref.h" |
+#include "components/dom_distiller/core/dom_distiller_service.h" |
+ |
+namespace dom_distiller { |
+namespace android { |
+ |
+class DomDistillerServiceFactoryAndroid; |
+ |
+// Native implementation of DomDistillerService, |
+// provides access to Java DistilledPagePrefs |
+class DomDistillerServiceAndroid { |
+ public: |
+ // Friend class so that DomDistillerServiceFactoryAndroid has access to |
+ // private member object java_ref_ |
+ friend class DomDistillerServiceFactoryAndroid; |
nyquist
2014/07/09 23:49:05
"Friend declarations should always be in the priva
sunangel
2014/07/10 14:31:53
Done.
|
+ DomDistillerServiceAndroid(DomDistillerService* service); |
+ virtual ~DomDistillerServiceAndroid(); |
+ static bool Register(JNIEnv* env); |
+ jlong GetDistilledPagePrefsPtr(JNIEnv* env, jobject obj); |
+ |
+ private: |
+ // Points to a Java instance of DomDistillerService |
nyquist
2014/07/09 23:49:05
Nit: Always period at end of comments.
sunangel
2014/07/10 14:31:53
Done.
|
+ base::android::ScopedJavaGlobalRef<jobject> java_ref_; |
+ DomDistillerService* service_; |
+}; |
+ |
+} // namespace android |
+} // namespace dom_distiller |
+ |
+#endif // COMPONENTS_DOM_DISTILLER_CORE_DOM_DISTILLER_SERVICE_ANDROID_H |