Gary Morain | ac1bdb4 | 2012-02-16 17:42:29 -0800 | [diff] [blame] | 1 | // Copyright (c) 2012 The Chromium OS 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 | |
Darin Petkov | 3ec5534 | 2012-09-28 14:04:44 +0200 | [diff] [blame] | 5 | #ifndef SHILL_MOCK_POWER_MANAGER_H_ |
| 6 | #define SHILL_MOCK_POWER_MANAGER_H_ |
Gary Morain | ac1bdb4 | 2012-02-16 17:42:29 -0800 | [diff] [blame] | 7 | |
| 8 | #include <base/basictypes.h> |
| 9 | #include <gmock/gmock.h> |
| 10 | |
| 11 | #include "shill/power_manager.h" |
| 12 | |
| 13 | namespace shill { |
| 14 | |
| 15 | class ProxyFactory; |
| 16 | |
| 17 | class MockPowerManager : public PowerManager { |
| 18 | public: |
Darin Petkov | 3ec5534 | 2012-09-28 14:04:44 +0200 | [diff] [blame] | 19 | MockPowerManager(EventDispatcher *dispatcher, ProxyFactory *proxy_factory); |
Gary Morain | ac1bdb4 | 2012-02-16 17:42:29 -0800 | [diff] [blame] | 20 | virtual ~MockPowerManager(); |
Darin Petkov | 3ec5534 | 2012-09-28 14:04:44 +0200 | [diff] [blame] | 21 | |
Gary Morain | ac1bdb4 | 2012-02-16 17:42:29 -0800 | [diff] [blame] | 22 | MOCK_METHOD2(AddStateChangeCallback, |
Eric Shienbrood | 3e20a23 | 2012-02-16 11:35:56 -0500 | [diff] [blame] | 23 | void(const std::string &key, |
| 24 | const PowerStateCallback &callback)); |
Gary Morain | 52fabab | 2012-08-22 09:27:31 -0700 | [diff] [blame] | 25 | MOCK_METHOD2(AddSuspendDelayCallback, |
| 26 | void(const std::string &key, |
| 27 | const SuspendDelayCallback &callback)); |
Gary Morain | ac1bdb4 | 2012-02-16 17:42:29 -0800 | [diff] [blame] | 28 | MOCK_METHOD1(RemoveStateChangeCallback, void(const std::string &key)); |
Gary Morain | 52fabab | 2012-08-22 09:27:31 -0700 | [diff] [blame] | 29 | MOCK_METHOD1(RemoveSuspendDelayCallback, void(const std::string &key)); |
Darin Petkov | 3ec5534 | 2012-09-28 14:04:44 +0200 | [diff] [blame] | 30 | MOCK_METHOD1(RegisterSuspendDelay, void(uint32 delay_ms)); |
| 31 | MOCK_METHOD0(UnregisterSuspendDelay, void()); |
| 32 | MOCK_METHOD1(SuspendReady, void(uint32 suspend_ready)); |
Gary Morain | ac1bdb4 | 2012-02-16 17:42:29 -0800 | [diff] [blame] | 33 | |
| 34 | private: |
| 35 | DISALLOW_COPY_AND_ASSIGN(MockPowerManager); |
| 36 | }; |
| 37 | |
| 38 | } // namespace shill |
| 39 | |
Darin Petkov | 3ec5534 | 2012-09-28 14:04:44 +0200 | [diff] [blame] | 40 | #endif // SHILL_MOCK_POWER_MANAGER_H_ |