| 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 virtual void RemoveConnectionObserver( | 52 virtual void RemoveConnectionObserver( |
| 53 GCMConnectionObserver* observer) OVERRIDE; | 53 GCMConnectionObserver* observer) OVERRIDE; |
| 54 virtual void Disable() OVERRIDE; | 54 virtual void Disable() OVERRIDE; |
| 55 virtual GCMClient* GetGCMClientForTesting() const OVERRIDE; | 55 virtual GCMClient* GetGCMClientForTesting() const OVERRIDE; |
| 56 virtual bool IsStarted() const OVERRIDE; | 56 virtual bool IsStarted() const OVERRIDE; |
| 57 virtual bool IsConnected() const OVERRIDE; | 57 virtual bool IsConnected() const OVERRIDE; |
| 58 virtual void GetGCMStatistics(const GetGCMStatisticsCallback& callback, | 58 virtual void GetGCMStatistics(const GetGCMStatisticsCallback& callback, |
| 59 bool clear_logs) OVERRIDE; | 59 bool clear_logs) OVERRIDE; |
| 60 virtual void SetGCMRecording(const GetGCMStatisticsCallback& callback, | 60 virtual void SetGCMRecording(const GetGCMStatisticsCallback& callback, |
| 61 bool recording) OVERRIDE; | 61 bool recording) OVERRIDE; |
| 62 virtual void SetAccountTokens( |
| 63 const std::vector<GCMClient::AccountTokenInfo>& account_tokens) OVERRIDE; |
| 62 virtual void UpdateAccountMapping( | 64 virtual void UpdateAccountMapping( |
| 63 const AccountMapping& account_mapping) OVERRIDE; | 65 const AccountMapping& account_mapping) OVERRIDE; |
| 64 virtual void RemoveAccountMapping(const std::string& account_id) OVERRIDE; | 66 virtual void RemoveAccountMapping(const std::string& account_id) OVERRIDE; |
| 65 | 67 |
| 66 protected: | 68 protected: |
| 67 // GCMDriver implementation: | 69 // GCMDriver implementation: |
| 68 virtual GCMClient::Result EnsureStarted() OVERRIDE; | 70 virtual GCMClient::Result EnsureStarted() OVERRIDE; |
| 69 virtual void RegisterImpl( | 71 virtual void RegisterImpl( |
| 70 const std::string& app_id, | 72 const std::string& app_id, |
| 71 const std::vector<std::string>& sender_ids) OVERRIDE; | 73 const std::vector<std::string>& sender_ids) OVERRIDE; |
| 72 virtual void UnregisterImpl(const std::string& app_id) OVERRIDE; | 74 virtual void UnregisterImpl(const std::string& app_id) OVERRIDE; |
| 73 virtual void SendImpl(const std::string& app_id, | 75 virtual void SendImpl(const std::string& app_id, |
| 74 const std::string& receiver_id, | 76 const std::string& receiver_id, |
| 75 const GCMClient::OutgoingMessage& message) OVERRIDE; | 77 const GCMClient::OutgoingMessage& message) OVERRIDE; |
| 76 | 78 |
| 77 private: | 79 private: |
| 78 base::android::ScopedJavaGlobalRef<jobject> java_ref_; | 80 base::android::ScopedJavaGlobalRef<jobject> java_ref_; |
| 79 | 81 |
| 80 DISALLOW_COPY_AND_ASSIGN(GCMDriverAndroid); | 82 DISALLOW_COPY_AND_ASSIGN(GCMDriverAndroid); |
| 81 }; | 83 }; |
| 82 | 84 |
| 83 } // namespace gcm | 85 } // namespace gcm |
| 84 | 86 |
| 85 #endif // COMPONENTS_GCM_DRIVER_GCM_DRIVER_ANDROID_H | 87 #endif // COMPONENTS_GCM_DRIVER_GCM_DRIVER_ANDROID_H |
| OLD | NEW |