OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef COMPONENTS_GCM_DRIVER_GCM_DRIVER_ANDROID_H | 5 #ifndef COMPONENTS_GCM_DRIVER_GCM_DRIVER_ANDROID_H |
6 #define COMPONENTS_GCM_DRIVER_GCM_DRIVER_ANDROID_H | 6 #define COMPONENTS_GCM_DRIVER_GCM_DRIVER_ANDROID_H |
7 | 7 |
8 #include <jni.h> | 8 #include <jni.h> |
9 | 9 |
10 #include "base/android/scoped_java_ref.h" | 10 #include "base/android/scoped_java_ref.h" |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 const base::android::JavaParamRef<jstring>& app_id, | 47 const base::android::JavaParamRef<jstring>& app_id, |
48 const base::android::JavaParamRef<jstring>& sender_id, | 48 const base::android::JavaParamRef<jstring>& sender_id, |
49 const base::android::JavaParamRef<jstring>& collapse_key, | 49 const base::android::JavaParamRef<jstring>& collapse_key, |
50 const base::android::JavaParamRef<jbyteArray>& raw_data, | 50 const base::android::JavaParamRef<jbyteArray>& raw_data, |
51 const base::android::JavaParamRef<jobjectArray>& data_keys_and_values); | 51 const base::android::JavaParamRef<jobjectArray>& data_keys_and_values); |
52 | 52 |
53 // Register JNI methods. | 53 // Register JNI methods. |
54 static bool RegisterJni(JNIEnv* env); | 54 static bool RegisterJni(JNIEnv* env); |
55 | 55 |
56 // GCMDriver implementation: | 56 // GCMDriver implementation: |
| 57 void ValidateRegistration( |
| 58 const std::string& app_id, |
| 59 const std::vector<std::string>& sender_ids, |
| 60 const std::string& registration_id, |
| 61 const ValidateRegistrationCallback& callback) override; |
57 void OnSignedIn() override; | 62 void OnSignedIn() override; |
58 void OnSignedOut() override; | 63 void OnSignedOut() override; |
59 void Enable() override; | 64 void Enable() override; |
60 void AddConnectionObserver(GCMConnectionObserver* observer) override; | 65 void AddConnectionObserver(GCMConnectionObserver* observer) override; |
61 void RemoveConnectionObserver(GCMConnectionObserver* observer) override; | 66 void RemoveConnectionObserver(GCMConnectionObserver* observer) override; |
62 void Disable() override; | 67 void Disable() override; |
63 GCMClient* GetGCMClientForTesting() const override; | 68 GCMClient* GetGCMClientForTesting() const override; |
64 bool IsStarted() const override; | 69 bool IsStarted() const override; |
65 bool IsConnected() const override; | 70 bool IsConnected() const override; |
66 void GetGCMStatistics(const GetGCMStatisticsCallback& callback, | 71 void GetGCMStatistics(const GetGCMStatisticsCallback& callback, |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 | 109 |
105 // Recorder that logs GCM activities. | 110 // Recorder that logs GCM activities. |
106 GCMStatsRecorderAndroid recorder_; | 111 GCMStatsRecorderAndroid recorder_; |
107 | 112 |
108 DISALLOW_COPY_AND_ASSIGN(GCMDriverAndroid); | 113 DISALLOW_COPY_AND_ASSIGN(GCMDriverAndroid); |
109 }; | 114 }; |
110 | 115 |
111 } // namespace gcm | 116 } // namespace gcm |
112 | 117 |
113 #endif // COMPONENTS_GCM_DRIVER_GCM_DRIVER_ANDROID_H | 118 #endif // COMPONENTS_GCM_DRIVER_GCM_DRIVER_ANDROID_H |
OLD | NEW |