| 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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 // GCMDriver implementation: | 85 // GCMDriver implementation: |
| 86 GCMClient::Result EnsureStarted(GCMClient::StartMode start_mode) override; | 86 GCMClient::Result EnsureStarted(GCMClient::StartMode start_mode) override; |
| 87 void RegisterImpl(const std::string& app_id, | 87 void RegisterImpl(const std::string& app_id, |
| 88 const std::vector<std::string>& sender_ids) override; | 88 const std::vector<std::string>& sender_ids) override; |
| 89 void UnregisterImpl(const std::string& app_id) override; | 89 void UnregisterImpl(const std::string& app_id) override; |
| 90 void UnregisterWithSenderIdImpl(const std::string& app_id, | 90 void UnregisterWithSenderIdImpl(const std::string& app_id, |
| 91 const std::string& sender_id) override; | 91 const std::string& sender_id) override; |
| 92 void SendImpl(const std::string& app_id, | 92 void SendImpl(const std::string& app_id, |
| 93 const std::string& receiver_id, | 93 const std::string& receiver_id, |
| 94 const OutgoingMessage& message) override; | 94 const OutgoingMessage& message) override; |
| 95 void RecordDecryptionFailure(const std::string& app_id, |
| 96 GCMEncryptionProvider::DecryptionFailure reason) |
| 97 override; |
| 95 | 98 |
| 96 private: | 99 private: |
| 97 base::android::ScopedJavaGlobalRef<jobject> java_ref_; | 100 base::android::ScopedJavaGlobalRef<jobject> java_ref_; |
| 98 | 101 |
| 99 // Callback for GetGCMStatistics. | 102 // Callback for GetGCMStatistics. |
| 100 GetGCMStatisticsCallback get_gcm_statistics_callback_; | 103 GetGCMStatisticsCallback get_gcm_statistics_callback_; |
| 101 | 104 |
| 102 // Recorder that logs GCM activities. | 105 // Recorder that logs GCM activities. |
| 103 GCMStatsRecorderAndroid recorder_; | 106 GCMStatsRecorderAndroid recorder_; |
| 104 | 107 |
| 105 DISALLOW_COPY_AND_ASSIGN(GCMDriverAndroid); | 108 DISALLOW_COPY_AND_ASSIGN(GCMDriverAndroid); |
| 106 }; | 109 }; |
| 107 | 110 |
| 108 } // namespace gcm | 111 } // namespace gcm |
| 109 | 112 |
| 110 #endif // COMPONENTS_GCM_DRIVER_GCM_DRIVER_ANDROID_H | 113 #endif // COMPONENTS_GCM_DRIVER_GCM_DRIVER_ANDROID_H |
| OLD | NEW |