OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef COMPONENTS_PAYMENTS_CONTENT_ANDROID_JOURNEY_LOGGER_ANDROID_H_ | |
6 #define COMPONENTS_PAYMENTS_CONTENT_ANDROID_JOURNEY_LOGGER_ANDROID_H_ | |
7 | |
8 #include <jni.h> | |
9 #include <memory> | |
10 | |
11 #include "base/android/scoped_java_ref.h" | |
12 #include "base/macros.h" | |
13 #include "components/payments/core/journey_logger.h" | |
14 | |
15 namespace payments { | |
16 | |
17 // Forwarding calls to payments::JourneyLogger. | |
18 class JourneyLoggerAndroid { | |
19 public: | |
20 JourneyLoggerAndroid(JNIEnv* env, jobject unused_obj){}; | |
21 ~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.
| |
22 | |
23 // Message from Java to destroy this object. | |
24 void Destroy(JNIEnv* env, const base::android::JavaParamRef<jobject>& obj); | |
25 | |
26 void SetNumberOfSuggestionsShown( | |
27 JNIEnv* env, | |
28 const base::android::JavaParamRef<jobject>& obj, | |
29 jint jsection, | |
30 jint jnumber); | |
31 void IncrementSelectionChanges( | |
32 JNIEnv* env, | |
33 const base::android::JavaParamRef<jobject>& obj, | |
34 jint jsection); | |
35 void IncrementSelectionEdits(JNIEnv* env, | |
36 const base::android::JavaParamRef<jobject>& obj, | |
37 jint jsection); | |
38 void IncrementSelectionAdds(JNIEnv* env, | |
39 const base::android::JavaParamRef<jobject>& obj, | |
40 jint jsection); | |
41 void SetCanMakePaymentValue(JNIEnv* env, | |
42 const base::android::JavaParamRef<jobject>& obj, | |
43 jboolean jvalue); | |
44 void SetShowCalled(JNIEnv* env, | |
45 const base::android::JavaParamRef<jobject>& obj); | |
46 void RecordJourneyStatsHistograms( | |
47 JNIEnv* env, | |
48 const base::android::JavaParamRef<jobject>& obj, | |
49 const base::android::JavaParamRef<jstring>& jcompletion_status); | |
50 | |
51 // Registers the JNI bindings for this class. | |
52 static bool Register(JNIEnv* env); | |
53 | |
54 private: | |
55 JourneyLogger journey_logger_; | |
56 | |
57 DISALLOW_COPY_AND_ASSIGN(JourneyLoggerAndroid); | |
58 }; | |
59 | |
60 } // namespace payments | |
61 | |
62 #endif // COMPONENTS_PAYMENTS_CONTENT_ANDROID_JOURNEY_LOGGER_ANDROID_H_ | |
OLD | NEW |