OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "extensions/shell/browser/shell_runtime_api_delegate.h" | 5 #include "extensions/shell/browser/shell_runtime_api_delegate.h" |
6 | 6 |
| 7 #include "build/build_config.h" |
7 #include "extensions/common/api/runtime.h" | 8 #include "extensions/common/api/runtime.h" |
8 | 9 |
9 #if defined(OS_CHROMEOS) | 10 #if defined(OS_CHROMEOS) |
10 #include "chromeos/dbus/dbus_thread_manager.h" | 11 #include "chromeos/dbus/dbus_thread_manager.h" |
11 #include "chromeos/dbus/power_manager_client.h" | 12 #include "chromeos/dbus/power_manager_client.h" |
12 #endif | 13 #endif |
13 | 14 |
14 using extensions::api::runtime::PlatformInfo; | 15 using extensions::api::runtime::PlatformInfo; |
15 | 16 |
16 namespace extensions { | 17 namespace extensions { |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 // We allow chrome.runtime.restart() to request a device restart on ChromeOS. | 58 // We allow chrome.runtime.restart() to request a device restart on ChromeOS. |
58 #if defined(OS_CHROMEOS) | 59 #if defined(OS_CHROMEOS) |
59 chromeos::DBusThreadManager::Get()->GetPowerManagerClient()->RequestRestart(); | 60 chromeos::DBusThreadManager::Get()->GetPowerManagerClient()->RequestRestart(); |
60 return true; | 61 return true; |
61 #endif | 62 #endif |
62 *error_message = "Restart is only supported on ChromeOS."; | 63 *error_message = "Restart is only supported on ChromeOS."; |
63 return false; | 64 return false; |
64 } | 65 } |
65 | 66 |
66 } // namespace extensions | 67 } // namespace extensions |
OLD | NEW |