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 | |
14 namespace payments { | |
15 | |
16 class JourneyLogger; | |
17 | |
18 // Forwarding calls to payments::JourneyLogger. | |
19 class JourneyLoggerAndroid { | |
20 public: | |
21 JourneyLoggerAndroid(JNIEnv* env, jobject unused_obj); | |
22 ~JourneyLoggerAndroid(); | |
23 | |
24 // Message from Java to destroy this object. | |
25 void Destroy(JNIEnv* env, const base::android::JavaParamRef<jobject>& obj); | |
26 | |
27 void SetNumberOfSuggestionsShown( | |
28 JNIEnv* env, | |
29 const base::android::JavaParamRef<jobject>& obj, | |
30 jint jsection, | |
31 jint jnumber); | |
32 void IncrementSelectionChanges( | |
33 JNIEnv* env, | |
34 const base::android::JavaParamRef<jobject>& obj, | |
35 jint jsection); | |
36 void IncrementSelectionEdits(JNIEnv* env, | |
37 const base::android::JavaParamRef<jobject>& obj, | |
38 jint jsection); | |
39 void IncrementSelectionAdds(JNIEnv* env, | |
40 const base::android::JavaParamRef<jobject>& obj, | |
41 jint jsection); | |
42 void SetCanMakePaymentValue(JNIEnv* env, | |
43 const base::android::JavaParamRef<jobject>& obj, | |
44 jboolean jvalue); | |
45 void SetShowCalled(JNIEnv* env, | |
46 const base::android::JavaParamRef<jobject>& obj); | |
47 void RecordJourneyStatsHistograms( | |
48 JNIEnv* env, | |
49 const base::android::JavaParamRef<jobject>& obj, | |
50 const base::android::JavaParamRef<jstring>& jcompletion_status); | |
51 | |
52 // Registers the JNI bindings for this class. | |
53 static bool Register(JNIEnv* env); | |
54 | |
55 private: | |
56 std::unique_ptr<JourneyLogger> journey_logger_; | |
Mathieu
2017/03/23 21:19:48
Can this be a regular member?
sebsg
2017/03/24 13:35:29
Done.
| |
57 | |
58 DISALLOW_COPY_AND_ASSIGN(JourneyLoggerAndroid); | |
59 }; | |
60 | |
61 } // namespace payments | |
62 | |
63 #endif // COMPONENTS_PAYMENTS_CONTENT_ANDROID_JOURNEY_LOGGER_ANDROID_H_ | |
OLD | NEW |