| 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 10 matching lines...) Expand all Loading... |
| 21 | 21 |
| 22 ShellRuntimeAPIDelegate::~ShellRuntimeAPIDelegate() { | 22 ShellRuntimeAPIDelegate::~ShellRuntimeAPIDelegate() { |
| 23 } | 23 } |
| 24 | 24 |
| 25 void ShellRuntimeAPIDelegate::AddUpdateObserver(UpdateObserver* observer) { | 25 void ShellRuntimeAPIDelegate::AddUpdateObserver(UpdateObserver* observer) { |
| 26 } | 26 } |
| 27 | 27 |
| 28 void ShellRuntimeAPIDelegate::RemoveUpdateObserver(UpdateObserver* observer) { | 28 void ShellRuntimeAPIDelegate::RemoveUpdateObserver(UpdateObserver* observer) { |
| 29 } | 29 } |
| 30 | 30 |
| 31 base::Version ShellRuntimeAPIDelegate::GetPreviousExtensionVersion( | |
| 32 const Extension* extension) { | |
| 33 return base::Version(); | |
| 34 } | |
| 35 | |
| 36 void ShellRuntimeAPIDelegate::ReloadExtension(const std::string& extension_id) { | 31 void ShellRuntimeAPIDelegate::ReloadExtension(const std::string& extension_id) { |
| 37 } | 32 } |
| 38 | 33 |
| 39 bool ShellRuntimeAPIDelegate::CheckForUpdates( | 34 bool ShellRuntimeAPIDelegate::CheckForUpdates( |
| 40 const std::string& extension_id, | 35 const std::string& extension_id, |
| 41 const UpdateCheckCallback& callback) { | 36 const UpdateCheckCallback& callback) { |
| 42 return false; | 37 return false; |
| 43 } | 38 } |
| 44 | 39 |
| 45 void ShellRuntimeAPIDelegate::OpenURL(const GURL& uninstall_url) { | 40 void ShellRuntimeAPIDelegate::OpenURL(const GURL& uninstall_url) { |
| (...skipping 12 matching lines...) Expand all Loading... |
| 58 // We allow chrome.runtime.restart() to request a device restart on ChromeOS. | 53 // We allow chrome.runtime.restart() to request a device restart on ChromeOS. |
| 59 #if defined(OS_CHROMEOS) | 54 #if defined(OS_CHROMEOS) |
| 60 chromeos::DBusThreadManager::Get()->GetPowerManagerClient()->RequestRestart(); | 55 chromeos::DBusThreadManager::Get()->GetPowerManagerClient()->RequestRestart(); |
| 61 return true; | 56 return true; |
| 62 #endif | 57 #endif |
| 63 *error_message = "Restart is only supported on ChromeOS."; | 58 *error_message = "Restart is only supported on ChromeOS."; |
| 64 return false; | 59 return false; |
| 65 } | 60 } |
| 66 | 61 |
| 67 } // namespace extensions | 62 } // namespace extensions |
| OLD | NEW |