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_FAKE_GCM_DRIVER_H_ | 5 #ifndef COMPONENTS_GCM_DRIVER_FAKE_GCM_DRIVER_H_ |
6 #define COMPONENTS_GCM_DRIVER_FAKE_GCM_DRIVER_H_ | 6 #define COMPONENTS_GCM_DRIVER_FAKE_GCM_DRIVER_H_ |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "components/gcm_driver/gcm_driver.h" | 10 #include "components/gcm_driver/gcm_driver.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 GCMAppHandler* handler) OVERRIDE; | 22 GCMAppHandler* handler) OVERRIDE; |
23 virtual void RemoveAppHandler(const std::string& app_id) OVERRIDE; | 23 virtual void RemoveAppHandler(const std::string& app_id) OVERRIDE; |
24 | 24 |
25 // GCMDriver implementation: | 25 // GCMDriver implementation: |
26 virtual void OnSignedIn() OVERRIDE; | 26 virtual void OnSignedIn() OVERRIDE; |
27 virtual void Purge() OVERRIDE; | 27 virtual void Purge() OVERRIDE; |
28 virtual void Enable() OVERRIDE; | 28 virtual void Enable() OVERRIDE; |
29 virtual void Disable() OVERRIDE; | 29 virtual void Disable() OVERRIDE; |
30 virtual GCMClient* GetGCMClientForTesting() const OVERRIDE; | 30 virtual GCMClient* GetGCMClientForTesting() const OVERRIDE; |
31 virtual bool IsStarted() const OVERRIDE; | 31 virtual bool IsStarted() const OVERRIDE; |
32 virtual bool IsGCMClientReady() const OVERRIDE; | |
33 virtual bool IsConnected() const OVERRIDE; | 32 virtual bool IsConnected() const OVERRIDE; |
34 virtual void GetGCMStatistics(const GetGCMStatisticsCallback& callback, | 33 virtual void GetGCMStatistics(const GetGCMStatisticsCallback& callback, |
35 bool clear_logs) OVERRIDE; | 34 bool clear_logs) OVERRIDE; |
36 virtual void SetGCMRecording(const GetGCMStatisticsCallback& callback, | 35 virtual void SetGCMRecording(const GetGCMStatisticsCallback& callback, |
37 bool recording) OVERRIDE; | 36 bool recording) OVERRIDE; |
38 | 37 |
39 protected: | 38 protected: |
40 // GCMDriver implementation: | 39 // GCMDriver implementation: |
41 virtual GCMClient::Result EnsureStarted() OVERRIDE; | 40 virtual GCMClient::Result EnsureStarted() OVERRIDE; |
42 virtual void RegisterImpl( | 41 virtual void RegisterImpl( |
43 const std::string& app_id, | 42 const std::string& app_id, |
44 const std::vector<std::string>& sender_ids) OVERRIDE; | 43 const std::vector<std::string>& sender_ids) OVERRIDE; |
45 virtual void UnregisterImpl(const std::string& app_id) OVERRIDE; | 44 virtual void UnregisterImpl(const std::string& app_id) OVERRIDE; |
46 virtual void SendImpl(const std::string& app_id, | 45 virtual void SendImpl(const std::string& app_id, |
47 const std::string& receiver_id, | 46 const std::string& receiver_id, |
48 const GCMClient::OutgoingMessage& message) OVERRIDE; | 47 const GCMClient::OutgoingMessage& message) OVERRIDE; |
49 | 48 |
50 private: | 49 private: |
51 DISALLOW_COPY_AND_ASSIGN(FakeGCMDriver); | 50 DISALLOW_COPY_AND_ASSIGN(FakeGCMDriver); |
52 }; | 51 }; |
53 | 52 |
54 } // namespace gcm | 53 } // namespace gcm |
55 | 54 |
56 #endif // COMPONENTS_GCM_DRIVER_FAKE_GCM_DRIVER_H_ | 55 #endif // COMPONENTS_GCM_DRIVER_FAKE_GCM_DRIVER_H_ |
OLD | NEW |