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 | |
Alex Vakulenko | 8a53229 | 2014-06-16 17:18:44 -0700 | [diff] [blame^] | 8 | #include <string> |
| 9 | |
Gary Morain | ac1bdb4 | 2012-02-16 17:42:29 -0800 | [diff] [blame] | 10 | #include <base/basictypes.h> |
| 11 | #include <gmock/gmock.h> |
| 12 | |
| 13 | #include "shill/power_manager.h" |
| 14 | |
| 15 | namespace shill { |
| 16 | |
| 17 | class ProxyFactory; |
| 18 | |
| 19 | class MockPowerManager : public PowerManager { |
| 20 | public: |
Darin Petkov | 3ec5534 | 2012-09-28 14:04:44 +0200 | [diff] [blame] | 21 | MockPowerManager(EventDispatcher *dispatcher, ProxyFactory *proxy_factory); |
Gary Morain | ac1bdb4 | 2012-02-16 17:42:29 -0800 | [diff] [blame] | 22 | virtual ~MockPowerManager(); |
Darin Petkov | 3ec5534 | 2012-09-28 14:04:44 +0200 | [diff] [blame] | 23 | |
Daniel Erat | fac0953 | 2014-04-17 20:25:59 -0700 | [diff] [blame] | 24 | MOCK_METHOD5(AddSuspendDelay, |
| 25 | bool(const std::string &key, |
Daniel Erat | f975367 | 2013-01-24 10:17:02 -0800 | [diff] [blame] | 26 | const std::string &description, |
Daniel Erat | fac0953 | 2014-04-17 20:25:59 -0700 | [diff] [blame] | 27 | base::TimeDelta timeout, |
| 28 | const SuspendImminentCallback &immiment_callback, |
| 29 | const SuspendDoneCallback &done_callback)); |
| 30 | MOCK_METHOD1(RemoveSuspendDelay, bool(const std::string &key)); |
| 31 | MOCK_METHOD2(ReportSuspendReadiness, |
| 32 | bool(const std::string &key, int suspend_id)); |
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_ |