OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "chrome/browser/chromeos/dbus/power_manager_client.h" | 5 #include "chrome/browser/chromeos/dbus/power_manager_client.h" |
6 | 6 |
| 7 #include <algorithm> |
| 8 |
7 #include "base/bind.h" | 9 #include "base/bind.h" |
8 #include "base/callback.h" | 10 #include "base/callback.h" |
9 #include "base/format_macros.h" | 11 #include "base/format_macros.h" |
10 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
| 13 #include "base/observer_list.h" |
11 #include "base/stringprintf.h" | 14 #include "base/stringprintf.h" |
12 #include "base/time.h" | 15 #include "base/time.h" |
13 #include "base/timer.h" | 16 #include "base/timer.h" |
14 #include "chrome/browser/chromeos/system/runtime_environment.h" | 17 #include "chrome/browser/chromeos/system/runtime_environment.h" |
15 #include "dbus/bus.h" | 18 #include "dbus/bus.h" |
16 #include "dbus/message.h" | 19 #include "dbus/message.h" |
17 #include "dbus/object_proxy.h" | 20 #include "dbus/object_proxy.h" |
18 #include "third_party/cros_system_api/dbus/service_constants.h" | 21 #include "third_party/cros_system_api/dbus/service_constants.h" |
19 | 22 |
20 namespace chromeos { | 23 namespace chromeos { |
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
339 | 342 |
340 PowerManagerClient* PowerManagerClient::Create(dbus::Bus* bus) { | 343 PowerManagerClient* PowerManagerClient::Create(dbus::Bus* bus) { |
341 if (system::runtime_environment::IsRunningOnChromeOS()) { | 344 if (system::runtime_environment::IsRunningOnChromeOS()) { |
342 return new PowerManagerClientImpl(bus); | 345 return new PowerManagerClientImpl(bus); |
343 } else { | 346 } else { |
344 return new PowerManagerClientStubImpl(); | 347 return new PowerManagerClientStubImpl(); |
345 } | 348 } |
346 } | 349 } |
347 | 350 |
348 } // namespace chromeos | 351 } // namespace chromeos |
OLD | NEW |