OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 CHROME_BROWSER_SERVICES_GCM_GCM_CLIENT_MOCK_H_ | 5 #ifndef CHROME_BROWSER_SERVICES_GCM_GCM_CLIENT_MOCK_H_ |
6 #define CHROME_BROWSER_SERVICES_GCM_GCM_CLIENT_MOCK_H_ | 6 #define CHROME_BROWSER_SERVICES_GCM_GCM_CLIENT_MOCK_H_ |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
10 #include "google_apis/gcm/gcm_client.h" | 10 #include "google_apis/gcm/gcm_client.h" |
(...skipping 30 matching lines...) Expand all Loading... |
41 Delegate* delegate) OVERRIDE; | 41 Delegate* delegate) OVERRIDE; |
42 virtual void Load() OVERRIDE; | 42 virtual void Load() OVERRIDE; |
43 virtual void Stop() OVERRIDE; | 43 virtual void Stop() OVERRIDE; |
44 virtual void CheckOut() OVERRIDE; | 44 virtual void CheckOut() OVERRIDE; |
45 virtual void Register(const std::string& app_id, | 45 virtual void Register(const std::string& app_id, |
46 const std::vector<std::string>& sender_ids) OVERRIDE; | 46 const std::vector<std::string>& sender_ids) OVERRIDE; |
47 virtual void Unregister(const std::string& app_id) OVERRIDE; | 47 virtual void Unregister(const std::string& app_id) OVERRIDE; |
48 virtual void Send(const std::string& app_id, | 48 virtual void Send(const std::string& app_id, |
49 const std::string& receiver_id, | 49 const std::string& receiver_id, |
50 const OutgoingMessage& message) OVERRIDE; | 50 const OutgoingMessage& message) OVERRIDE; |
| 51 virtual void SetRecording(bool recording) OVERRIDE; |
| 52 virtual void ClearActivityLogs() OVERRIDE; |
51 virtual GCMStatistics GetStatistics() const OVERRIDE; | 53 virtual GCMStatistics GetStatistics() const OVERRIDE; |
52 | 54 |
53 // Initiate the loading that has been delayed. | 55 // Initiate the loading that has been delayed. |
54 // Called on UI thread. | 56 // Called on UI thread. |
55 void PerformDelayedLoading(); | 57 void PerformDelayedLoading(); |
56 | 58 |
57 // Simulate receiving something from the server. | 59 // Simulate receiving something from the server. |
58 // Called on UI thread. | 60 // Called on UI thread. |
59 void ReceiveMessage(const std::string& app_id, | 61 void ReceiveMessage(const std::string& app_id, |
60 const IncomingMessage& message); | 62 const IncomingMessage& message); |
(...skipping 22 matching lines...) Expand all Loading... |
83 Status status_; | 85 Status status_; |
84 LoadingDelay loading_delay_; | 86 LoadingDelay loading_delay_; |
85 base::WeakPtrFactory<GCMClientMock> weak_ptr_factory_; | 87 base::WeakPtrFactory<GCMClientMock> weak_ptr_factory_; |
86 | 88 |
87 DISALLOW_COPY_AND_ASSIGN(GCMClientMock); | 89 DISALLOW_COPY_AND_ASSIGN(GCMClientMock); |
88 }; | 90 }; |
89 | 91 |
90 } // namespace gcm | 92 } // namespace gcm |
91 | 93 |
92 #endif // CHROME_BROWSER_SERVICES_GCM_GCM_CLIENT_MOCK_H_ | 94 #endif // CHROME_BROWSER_SERVICES_GCM_GCM_CLIENT_MOCK_H_ |
OLD | NEW |