| 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 bool clear_logs) override; | 57 bool clear_logs) override; |
| 58 void SetGCMRecording(const GetGCMStatisticsCallback& callback, | 58 void SetGCMRecording(const GetGCMStatisticsCallback& callback, |
| 59 bool recording) override; | 59 bool recording) override; |
| 60 void SetAccountTokens( | 60 void SetAccountTokens( |
| 61 const std::vector<GCMClient::AccountTokenInfo>& account_tokens) override; | 61 const std::vector<GCMClient::AccountTokenInfo>& account_tokens) override; |
| 62 void UpdateAccountMapping(const AccountMapping& account_mapping) override; | 62 void UpdateAccountMapping(const AccountMapping& account_mapping) override; |
| 63 void RemoveAccountMapping(const std::string& account_id) override; | 63 void RemoveAccountMapping(const std::string& account_id) override; |
| 64 base::Time GetLastTokenFetchTime() override; | 64 base::Time GetLastTokenFetchTime() override; |
| 65 void SetLastTokenFetchTime(const base::Time& time) override; | 65 void SetLastTokenFetchTime(const base::Time& time) override; |
| 66 void WakeFromSuspendForHeartbeat(bool wake) override; | 66 void WakeFromSuspendForHeartbeat(bool wake) override; |
| 67 InstanceIDStore* GetInstanceIDStore() override; | 67 InstanceIDHandler* GetInstanceIDHandler() override; |
| 68 void AddHeartbeatInterval(const std::string& scope, int interval_ms) override; | 68 void AddHeartbeatInterval(const std::string& scope, int interval_ms) override; |
| 69 void RemoveHeartbeatInterval(const std::string& scope) override; | 69 void RemoveHeartbeatInterval(const std::string& scope) override; |
| 70 | 70 |
| 71 protected: | 71 protected: |
| 72 // GCMDriver implementation: | 72 // GCMDriver implementation: |
| 73 GCMClient::Result EnsureStarted(GCMClient::StartMode start_mode) override; | 73 GCMClient::Result EnsureStarted(GCMClient::StartMode start_mode) override; |
| 74 void RegisterImpl(const std::string& app_id, | 74 void RegisterImpl(const std::string& app_id, |
| 75 const std::vector<std::string>& sender_ids) override; | 75 const std::vector<std::string>& sender_ids) override; |
| 76 void UnregisterImpl(const std::string& app_id) override; | 76 void UnregisterImpl(const std::string& app_id) override; |
| 77 void UnregisterWithSenderIdImpl(const std::string& app_id, | 77 void UnregisterWithSenderIdImpl(const std::string& app_id, |
| 78 const std::string& sender_id) override; | 78 const std::string& sender_id) override; |
| 79 void SendImpl(const std::string& app_id, | 79 void SendImpl(const std::string& app_id, |
| 80 const std::string& receiver_id, | 80 const std::string& receiver_id, |
| 81 const GCMClient::OutgoingMessage& message) override; | 81 const GCMClient::OutgoingMessage& message) override; |
| 82 | 82 |
| 83 private: | 83 private: |
| 84 base::android::ScopedJavaGlobalRef<jobject> java_ref_; | 84 base::android::ScopedJavaGlobalRef<jobject> java_ref_; |
| 85 | 85 |
| 86 DISALLOW_COPY_AND_ASSIGN(GCMDriverAndroid); | 86 DISALLOW_COPY_AND_ASSIGN(GCMDriverAndroid); |
| 87 }; | 87 }; |
| 88 | 88 |
| 89 } // namespace gcm | 89 } // namespace gcm |
| 90 | 90 |
| 91 #endif // COMPONENTS_GCM_DRIVER_GCM_DRIVER_ANDROID_H | 91 #endif // COMPONENTS_GCM_DRIVER_GCM_DRIVER_ANDROID_H |
| OLD | NEW |