Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(215)

Side by Side Diff: extensions/shell/browser/shell_runtime_api_delegate.cc

Issue 1226353004: Generate all extension schema namespaces as "api" and instead vary the generated bundle names. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 "extensions/common/api/runtime.h" 7 #include "extensions/common/api/runtime.h"
8 8
9 #if defined(OS_CHROMEOS) 9 #if defined(OS_CHROMEOS)
10 #include "chromeos/dbus/dbus_thread_manager.h" 10 #include "chromeos/dbus/dbus_thread_manager.h"
11 #include "chromeos/dbus/power_manager_client.h" 11 #include "chromeos/dbus/power_manager_client.h"
12 #endif 12 #endif
13 13
14 using extensions::core_api::runtime::PlatformInfo; 14 using extensions::api::runtime::PlatformInfo;
15 15
16 namespace extensions { 16 namespace extensions {
17 17
18 ShellRuntimeAPIDelegate::ShellRuntimeAPIDelegate() { 18 ShellRuntimeAPIDelegate::ShellRuntimeAPIDelegate() {
19 } 19 }
20 20
21 ShellRuntimeAPIDelegate::~ShellRuntimeAPIDelegate() { 21 ShellRuntimeAPIDelegate::~ShellRuntimeAPIDelegate() {
22 } 22 }
23 23
24 void ShellRuntimeAPIDelegate::AddUpdateObserver(UpdateObserver* observer) { 24 void ShellRuntimeAPIDelegate::AddUpdateObserver(UpdateObserver* observer) {
(...skipping 14 matching lines...) Expand all
39 const std::string& extension_id, 39 const std::string& extension_id,
40 const UpdateCheckCallback& callback) { 40 const UpdateCheckCallback& callback) {
41 return false; 41 return false;
42 } 42 }
43 43
44 void ShellRuntimeAPIDelegate::OpenURL(const GURL& uninstall_url) { 44 void ShellRuntimeAPIDelegate::OpenURL(const GURL& uninstall_url) {
45 } 45 }
46 46
47 bool ShellRuntimeAPIDelegate::GetPlatformInfo(PlatformInfo* info) { 47 bool ShellRuntimeAPIDelegate::GetPlatformInfo(PlatformInfo* info) {
48 #if defined(OS_CHROMEOS) 48 #if defined(OS_CHROMEOS)
49 info->os = core_api::runtime::PLATFORM_OS_CROS; 49 info->os = api::runtime::PLATFORM_OS_CROS;
50 #elif defined(OS_LINUX) 50 #elif defined(OS_LINUX)
51 info->os = core_api::runtime::PLATFORM_OS_LINUX; 51 info->os = api::runtime::PLATFORM_OS_LINUX;
52 #endif 52 #endif
53 return true; 53 return true;
54 } 54 }
55 55
56 bool ShellRuntimeAPIDelegate::RestartDevice(std::string* error_message) { 56 bool ShellRuntimeAPIDelegate::RestartDevice(std::string* error_message) {
57 // We allow chrome.runtime.restart() to request a device restart on ChromeOS. 57 // We allow chrome.runtime.restart() to request a device restart on ChromeOS.
58 #if defined(OS_CHROMEOS) 58 #if defined(OS_CHROMEOS)
59 chromeos::DBusThreadManager::Get()->GetPowerManagerClient()->RequestRestart(); 59 chromeos::DBusThreadManager::Get()->GetPowerManagerClient()->RequestRestart();
60 return true; 60 return true;
61 #endif 61 #endif
62 *error_message = "Restart is only supported on ChromeOS."; 62 *error_message = "Restart is only supported on ChromeOS.";
63 return false; 63 return false;
64 } 64 }
65 65
66 } // namespace extensions 66 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/shell/browser/shell_runtime_api_delegate.h ('k') | extensions/shell/common/api/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698