| 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_H_ | 5 #ifndef COMPONENTS_GCM_DRIVER_GCM_DRIVER_H_ |
| 6 #define COMPONENTS_GCM_DRIVER_GCM_DRIVER_H_ | 6 #define COMPONENTS_GCM_DRIVER_GCM_DRIVER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 | 79 |
| 80 // For testing purpose. Always NULL on Android. | 80 // For testing purpose. Always NULL on Android. |
| 81 virtual GCMClient* GetGCMClientForTesting() const = 0; | 81 virtual GCMClient* GetGCMClientForTesting() const = 0; |
| 82 | 82 |
| 83 // Returns true if the service was started. | 83 // Returns true if the service was started. |
| 84 virtual bool IsStarted() const = 0; | 84 virtual bool IsStarted() const = 0; |
| 85 | 85 |
| 86 // Returns true if the gcm client is ready. | 86 // Returns true if the gcm client is ready. |
| 87 virtual bool IsGCMClientReady() const = 0; | 87 virtual bool IsGCMClientReady() const = 0; |
| 88 | 88 |
| 89 // Returns true if the gcm client has an open and active connection. |
| 90 virtual bool IsConnected() const = 0; |
| 91 |
| 89 // Get GCM client internal states and statistics. | 92 // Get GCM client internal states and statistics. |
| 90 // If clear_logs is true then activity logs will be cleared before the stats | 93 // If clear_logs is true then activity logs will be cleared before the stats |
| 91 // are returned. | 94 // are returned. |
| 92 virtual void GetGCMStatistics(const GetGCMStatisticsCallback& callback, | 95 virtual void GetGCMStatistics(const GetGCMStatisticsCallback& callback, |
| 93 bool clear_logs) = 0; | 96 bool clear_logs) = 0; |
| 94 | 97 |
| 95 // Enables/disables GCM activity recording, and then returns the stats. | 98 // Enables/disables GCM activity recording, and then returns the stats. |
| 96 virtual void SetGCMRecording(const GetGCMStatisticsCallback& callback, | 99 virtual void SetGCMRecording(const GetGCMStatisticsCallback& callback, |
| 97 bool recording) = 0; | 100 bool recording) = 0; |
| 98 | 101 |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 | 159 |
| 157 // The default handler when no app handler can be found in the map. | 160 // The default handler when no app handler can be found in the map. |
| 158 DefaultGCMAppHandler default_app_handler_; | 161 DefaultGCMAppHandler default_app_handler_; |
| 159 | 162 |
| 160 DISALLOW_COPY_AND_ASSIGN(GCMDriver); | 163 DISALLOW_COPY_AND_ASSIGN(GCMDriver); |
| 161 }; | 164 }; |
| 162 | 165 |
| 163 } // namespace gcm | 166 } // namespace gcm |
| 164 | 167 |
| 165 #endif // COMPONENTS_GCM_DRIVER_GCM_DRIVER_H_ | 168 #endif // COMPONENTS_GCM_DRIVER_GCM_DRIVER_H_ |
| OLD | NEW |