| 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" |
| 11 | 11 |
| 12 namespace gcm { | 12 namespace gcm { |
| 13 | 13 |
| 14 class FakeGCMDriver : public GCMDriver { | 14 class FakeGCMDriver : public GCMDriver { |
| 15 public: | 15 public: |
| 16 FakeGCMDriver(); | 16 FakeGCMDriver(); |
| 17 explicit FakeGCMDriver( | |
| 18 const scoped_refptr<base::SequencedTaskRunner>& blocking_task_runner); | |
| 19 | |
| 20 ~FakeGCMDriver() override; | 17 ~FakeGCMDriver() override; |
| 21 | 18 |
| 22 // GCMDriver overrides: | 19 // GCMDriver overrides: |
| 23 void Shutdown() override; | 20 void Shutdown() override; |
| 24 void AddAppHandler(const std::string& app_id, | 21 void AddAppHandler(const std::string& app_id, |
| 25 GCMAppHandler* handler) override; | 22 GCMAppHandler* handler) override; |
| 26 void RemoveAppHandler(const std::string& app_id) override; | 23 void RemoveAppHandler(const std::string& app_id) override; |
| 27 void OnSignedIn() override; | 24 void OnSignedIn() override; |
| 28 void OnSignedOut() override; | 25 void OnSignedOut() override; |
| 29 void AddConnectionObserver(GCMConnectionObserver* observer) override; | 26 void AddConnectionObserver(GCMConnectionObserver* observer) override; |
| (...skipping 29 matching lines...) Expand all Loading... |
| 59 const std::string& receiver_id, | 56 const std::string& receiver_id, |
| 60 const OutgoingMessage& message) override; | 57 const OutgoingMessage& message) override; |
| 61 | 58 |
| 62 private: | 59 private: |
| 63 DISALLOW_COPY_AND_ASSIGN(FakeGCMDriver); | 60 DISALLOW_COPY_AND_ASSIGN(FakeGCMDriver); |
| 64 }; | 61 }; |
| 65 | 62 |
| 66 } // namespace gcm | 63 } // namespace gcm |
| 67 | 64 |
| 68 #endif // COMPONENTS_GCM_DRIVER_FAKE_GCM_DRIVER_H_ | 65 #endif // COMPONENTS_GCM_DRIVER_FAKE_GCM_DRIVER_H_ |
| OLD | NEW |