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 | |
Ben Chan | cc67c52 | 2014-09-03 07:19:18 -0700 | [diff] [blame] | 10 | #include <base/macros.h> |
Gary Morain | ac1bdb4 | 2012-02-16 17:42:29 -0800 | [diff] [blame] | 11 | #include <gmock/gmock.h> |
| 12 | |
| 13 | #include "shill/power_manager.h" |
| 14 | |
| 15 | namespace shill { |
| 16 | |
Peter Qiu | 608ec29 | 2015-07-30 15:46:16 -0700 | [diff] [blame] | 17 | class ControlInterface; |
Gary Morain | ac1bdb4 | 2012-02-16 17:42:29 -0800 | [diff] [blame] | 18 | |
| 19 | class MockPowerManager : public PowerManager { |
| 20 | public: |
Peter Qiu | 608ec29 | 2015-07-30 15:46:16 -0700 | [diff] [blame] | 21 | MockPowerManager(EventDispatcher* dispatcher, |
| 22 | ControlInterface* control_interface); |
Ben Chan | 5ea763b | 2014-08-13 11:07:54 -0700 | [diff] [blame] | 23 | ~MockPowerManager() override; |
Darin Petkov | 3ec5534 | 2012-09-28 14:04:44 +0200 | [diff] [blame] | 24 | |
Prathmesh Prabhu | 9fdb84b | 2014-08-21 18:41:58 -0700 | [diff] [blame] | 25 | MOCK_METHOD0(ReportSuspendReadiness, bool()); |
Samuel Tan | 68b73d2 | 2014-10-28 17:00:56 -0700 | [diff] [blame] | 26 | MOCK_METHOD0(ReportDarkSuspendReadiness, bool()); |
Peter Qiu | 7723677 | 2015-08-13 13:03:43 -0700 | [diff] [blame] | 27 | MOCK_METHOD4( |
Prathmesh Prabhu | 9fdb84b | 2014-08-21 18:41:58 -0700 | [diff] [blame] | 28 | Start, |
Peter Qiu | 7723677 | 2015-08-13 13:03:43 -0700 | [diff] [blame] | 29 | void(base::TimeDelta suspend_delay, |
Paul Stewart | 1e006c6 | 2015-06-16 12:29:06 -0700 | [diff] [blame] | 30 | const PowerManager::SuspendImminentCallback& imminent_callback, |
| 31 | const PowerManager::SuspendDoneCallback& done_callback, |
| 32 | const PowerManager::DarkSuspendImminentCallback& dark_imminent)); |
Prathmesh Prabhu | 9fdb84b | 2014-08-21 18:41:58 -0700 | [diff] [blame] | 33 | MOCK_METHOD0(Stop, void()); |
Gary Morain | ac1bdb4 | 2012-02-16 17:42:29 -0800 | [diff] [blame] | 34 | |
| 35 | private: |
| 36 | DISALLOW_COPY_AND_ASSIGN(MockPowerManager); |
| 37 | }; |
| 38 | |
| 39 | } // namespace shill |
| 40 | |
Darin Petkov | 3ec5534 | 2012-09-28 14:04:44 +0200 | [diff] [blame] | 41 | #endif // SHILL_MOCK_POWER_MANAGER_H_ |