OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef COMPONENTS_GCM_DRIVER_FAKE_GCM_DRIVER_H_ |
| 6 #define COMPONENTS_GCM_DRIVER_FAKE_GCM_DRIVER_H_ |
| 7 |
| 8 #include "base/compiler_specific.h" |
| 9 #include "base/macros.h" |
| 10 #include "components/gcm_driver/gcm_driver.h" |
| 11 |
| 12 namespace gcm { |
| 13 |
| 14 class FakeGCMDriver : public GCMDriver { |
| 15 public: |
| 16 FakeGCMDriver(); |
| 17 virtual ~FakeGCMDriver(); |
| 18 |
| 19 // GCMDriver overrides: |
| 20 virtual void Shutdown() OVERRIDE; |
| 21 virtual void AddAppHandler(const std::string& app_id, |
| 22 GCMAppHandler* handler) OVERRIDE; |
| 23 virtual void RemoveAppHandler(const std::string& app_id) OVERRIDE; |
| 24 |
| 25 // GCMDriver implementation: |
| 26 virtual void Enable() OVERRIDE; |
| 27 virtual void Disable() OVERRIDE; |
| 28 virtual void Register(const std::string& app_id, |
| 29 const std::vector<std::string>& sender_ids, |
| 30 const RegisterCallback& callback) OVERRIDE; |
| 31 virtual void Unregister(const std::string& app_id, |
| 32 const UnregisterCallback& callback) OVERRIDE; |
| 33 virtual void Send(const std::string& app_id, |
| 34 const std::string& receiver_id, |
| 35 const GCMClient::OutgoingMessage& message, |
| 36 const SendCallback& callback) OVERRIDE; |
| 37 virtual GCMClient* GetGCMClientForTesting() const OVERRIDE; |
| 38 virtual bool IsStarted() const OVERRIDE; |
| 39 virtual bool IsGCMClientReady() const OVERRIDE; |
| 40 virtual void GetGCMStatistics(const GetGCMStatisticsCallback& callback, |
| 41 bool clear_logs) OVERRIDE; |
| 42 virtual void SetGCMRecording(const GetGCMStatisticsCallback& callback, |
| 43 bool recording) OVERRIDE; |
| 44 virtual std::string SignedInUserName() const OVERRIDE; |
| 45 |
| 46 private: |
| 47 DISALLOW_COPY_AND_ASSIGN(FakeGCMDriver); |
| 48 }; |
| 49 |
| 50 } // namespace gcm |
| 51 |
| 52 #endif // COMPONENTS_GCM_DRIVER_FAKE_GCM_DRIVER_H_ |
OLD | NEW |