Index: components/payments/content/android/journey_logger_android.h |
diff --git a/components/payments/content/android/journey_logger_android.h b/components/payments/content/android/journey_logger_android.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..1df2d6ef0ca79d0576313aa12c02e3d83042c2c7 |
--- /dev/null |
+++ b/components/payments/content/android/journey_logger_android.h |
@@ -0,0 +1,62 @@ |
+// Copyright 2017 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_PAYMENTS_CONTENT_ANDROID_JOURNEY_LOGGER_ANDROID_H_ |
+#define COMPONENTS_PAYMENTS_CONTENT_ANDROID_JOURNEY_LOGGER_ANDROID_H_ |
+ |
+#include <jni.h> |
+#include <memory> |
+ |
+#include "base/android/scoped_java_ref.h" |
+#include "base/macros.h" |
+#include "components/payments/core/journey_logger.h" |
+ |
+namespace payments { |
+ |
+// Forwarding calls to payments::JourneyLogger. |
+class JourneyLoggerAndroid { |
+ public: |
+ JourneyLoggerAndroid(JNIEnv* env, jobject unused_obj){}; |
+ ~JourneyLoggerAndroid(){}; |
Mathieu
2017/03/24 13:46:44
nit: add a space and no ;
(here and above)
sebsg
2017/03/24 13:53:19
Done.
|
+ |
+ // Message from Java to destroy this object. |
+ void Destroy(JNIEnv* env, const base::android::JavaParamRef<jobject>& obj); |
+ |
+ void SetNumberOfSuggestionsShown( |
+ JNIEnv* env, |
+ const base::android::JavaParamRef<jobject>& obj, |
+ jint jsection, |
+ jint jnumber); |
+ void IncrementSelectionChanges( |
+ JNIEnv* env, |
+ const base::android::JavaParamRef<jobject>& obj, |
+ jint jsection); |
+ void IncrementSelectionEdits(JNIEnv* env, |
+ const base::android::JavaParamRef<jobject>& obj, |
+ jint jsection); |
+ void IncrementSelectionAdds(JNIEnv* env, |
+ const base::android::JavaParamRef<jobject>& obj, |
+ jint jsection); |
+ void SetCanMakePaymentValue(JNIEnv* env, |
+ const base::android::JavaParamRef<jobject>& obj, |
+ jboolean jvalue); |
+ void SetShowCalled(JNIEnv* env, |
+ const base::android::JavaParamRef<jobject>& obj); |
+ void RecordJourneyStatsHistograms( |
+ JNIEnv* env, |
+ const base::android::JavaParamRef<jobject>& obj, |
+ const base::android::JavaParamRef<jstring>& jcompletion_status); |
+ |
+ // Registers the JNI bindings for this class. |
+ static bool Register(JNIEnv* env); |
+ |
+ private: |
+ JourneyLogger journey_logger_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(JourneyLoggerAndroid); |
+}; |
+ |
+} // namespace payments |
+ |
+#endif // COMPONENTS_PAYMENTS_CONTENT_ANDROID_JOURNEY_LOGGER_ANDROID_H_ |