| 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 "build/build_config.h" |
| 8 #include "extensions/common/api/runtime.h" | 8 #include "extensions/common/api/runtime.h" |
| 9 | 9 |
| 10 #if defined(OS_CHROMEOS) | 10 #if defined(OS_CHROMEOS) |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 bool ShellRuntimeAPIDelegate::RestartDevice(std::string* error_message) { | 57 bool ShellRuntimeAPIDelegate::RestartDevice(std::string* error_message) { |
| 58 // 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. |
| 59 #if defined(OS_CHROMEOS) | 59 #if defined(OS_CHROMEOS) |
| 60 chromeos::DBusThreadManager::Get()->GetPowerManagerClient()->RequestRestart(); | 60 chromeos::DBusThreadManager::Get()->GetPowerManagerClient()->RequestRestart(); |
| 61 return true; | 61 return true; |
| 62 #endif | 62 #endif |
| 63 *error_message = "Restart is only supported on ChromeOS."; | 63 *error_message = "Restart is only supported on ChromeOS."; |
| 64 return false; | 64 return false; |
| 65 } | 65 } |
| 66 | 66 |
| 67 void ShellRuntimeAPIDelegate::SetOnDeviceShutdownCallback( |
| 68 const base::Closure& callback) { |
| 69 } |
| 70 |
| 67 } // namespace extensions | 71 } // namespace extensions |
| OLD | NEW |