OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "chromeos/dbus/power_manager_client.h" | 5 #include "chromeos/dbus/power_manager_client.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
11 #include "base/format_macros.h" | 11 #include "base/format_macros.h" |
12 #include "base/logging.h" | 12 #include "base/logging.h" |
13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
14 #include "base/message_loop/message_loop.h" | 14 #include "base/message_loop/message_loop.h" |
15 #include "base/observer_list.h" | 15 #include "base/observer_list.h" |
16 #include "base/power_monitor/power_monitor_device_source.h" | 16 #include "base/power_monitor/power_monitor_device_source.h" |
17 #include "base/strings/string_number_conversions.h" | 17 #include "base/strings/string_number_conversions.h" |
18 #include "base/strings/string_split.h" | 18 #include "base/strings/string_split.h" |
19 #include "base/strings/stringprintf.h" | 19 #include "base/strings/stringprintf.h" |
20 #include "base/threading/platform_thread.h" | 20 #include "base/threading/platform_thread.h" |
21 #include "base/timer/timer.h" | 21 #include "base/timer/timer.h" |
22 #include "chromeos/chromeos_switches.h" | 22 #include "chromeos/chromeos_switches.h" |
23 #include "chromeos/dbus/fake_power_manager_client.h" | |
23 #include "chromeos/dbus/power_manager/input_event.pb.h" | 24 #include "chromeos/dbus/power_manager/input_event.pb.h" |
24 #include "chromeos/dbus/power_manager/peripheral_battery_status.pb.h" | 25 #include "chromeos/dbus/power_manager/peripheral_battery_status.pb.h" |
25 #include "chromeos/dbus/power_manager/policy.pb.h" | 26 #include "chromeos/dbus/power_manager/policy.pb.h" |
26 #include "chromeos/dbus/power_manager/power_supply_properties.pb.h" | 27 #include "chromeos/dbus/power_manager/power_supply_properties.pb.h" |
27 #include "chromeos/dbus/power_manager/suspend.pb.h" | 28 #include "chromeos/dbus/power_manager/suspend.pb.h" |
28 #include "components/device_event_log/device_event_log.h" | 29 #include "components/device_event_log/device_event_log.h" |
29 #include "dbus/bus.h" | 30 #include "dbus/bus.h" |
30 #include "dbus/message.h" | 31 #include "dbus/message.h" |
31 #include "dbus/object_path.h" | 32 #include "dbus/object_path.h" |
32 #include "dbus/object_proxy.h" | 33 #include "dbus/object_proxy.h" |
(...skipping 961 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
994 | 995 |
995 PowerManagerClient::~PowerManagerClient() { | 996 PowerManagerClient::~PowerManagerClient() { |
996 } | 997 } |
997 | 998 |
998 // static | 999 // static |
999 PowerManagerClient* PowerManagerClient::Create( | 1000 PowerManagerClient* PowerManagerClient::Create( |
1000 DBusClientImplementationType type) { | 1001 DBusClientImplementationType type) { |
1001 if (type == REAL_DBUS_CLIENT_IMPLEMENTATION) | 1002 if (type == REAL_DBUS_CLIENT_IMPLEMENTATION) |
1002 return new PowerManagerClientImpl(); | 1003 return new PowerManagerClientImpl(); |
1003 DCHECK_EQ(STUB_DBUS_CLIENT_IMPLEMENTATION, type); | 1004 DCHECK_EQ(STUB_DBUS_CLIENT_IMPLEMENTATION, type); |
1004 return new PowerManagerClientStubImpl(); | 1005 return new FakePowerManagerClient; |
Daniel Erat
2015/06/29 19:34:18
have you tried to compile this for chrome os (rath
mozartalouis
2015/06/29 20:06:02
Done.
This should work for chrome OS. compiled to
| |
1005 } | 1006 } |
1006 | 1007 |
1007 } // namespace chromeos | 1008 } // namespace chromeos |
OLD | NEW |