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