OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/extensions/api/developer_private/developer_private_api. h" | 5 #include "chrome/browser/extensions/api/developer_private/developer_private_api. h" |
6 | 6 |
7 #include "apps/app_load_service.h" | 7 #include "apps/app_load_service.h" |
8 #include "apps/app_restore_service.h" | 8 #include "apps/app_restore_service.h" |
9 #include "apps/saved_files_service.h" | 9 #include "apps/saved_files_service.h" |
10 #include "apps/shell_window.h" | 10 #include "apps/shell_window.h" |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
122 | 122 |
123 namespace AllowFileAccess = api::developer_private::AllowFileAccess; | 123 namespace AllowFileAccess = api::developer_private::AllowFileAccess; |
124 namespace AllowIncognito = api::developer_private::AllowIncognito; | 124 namespace AllowIncognito = api::developer_private::AllowIncognito; |
125 namespace ChoosePath = api::developer_private::ChoosePath; | 125 namespace ChoosePath = api::developer_private::ChoosePath; |
126 namespace Enable = api::developer_private::Enable; | 126 namespace Enable = api::developer_private::Enable; |
127 namespace GetItemsInfo = api::developer_private::GetItemsInfo; | 127 namespace GetItemsInfo = api::developer_private::GetItemsInfo; |
128 namespace Inspect = api::developer_private::Inspect; | 128 namespace Inspect = api::developer_private::Inspect; |
129 namespace PackDirectory = api::developer_private::PackDirectory; | 129 namespace PackDirectory = api::developer_private::PackDirectory; |
130 namespace Reload = api::developer_private::Reload; | 130 namespace Reload = api::developer_private::Reload; |
131 namespace Restart = api::developer_private::Restart; | 131 namespace Restart = api::developer_private::Restart; |
132 namespace IsManager = api::developer_private::Restart; | |
xiyuan
2013/08/27 17:02:34
A few issues:
- IsManager = ...::Restart?
- Should
dvh
2013/08/27 17:51:06
I'm removing it.
| |
132 | 133 |
133 DeveloperPrivateAPI* DeveloperPrivateAPI::Get(Profile* profile) { | 134 DeveloperPrivateAPI* DeveloperPrivateAPI::Get(Profile* profile) { |
134 return DeveloperPrivateAPIFactory::GetForProfile(profile); | 135 return DeveloperPrivateAPIFactory::GetForProfile(profile); |
135 } | 136 } |
136 | 137 |
137 DeveloperPrivateAPI::DeveloperPrivateAPI(Profile* profile) : profile_(profile) { | 138 DeveloperPrivateAPI::DeveloperPrivateAPI(Profile* profile) : profile_(profile) { |
138 RegisterNotifications(); | 139 RegisterNotifications(); |
139 } | 140 } |
140 | 141 |
141 DeveloperPrivateEventRouter::DeveloperPrivateEventRouter(Profile* profile) | 142 DeveloperPrivateEventRouter::DeveloperPrivateEventRouter(Profile* profile) |
(...skipping 1118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1260 // Delete confirmation dialog. | 1261 // Delete confirmation dialog. |
1261 SET_STRING("deleteConfirmationDeleteButton", | 1262 SET_STRING("deleteConfirmationDeleteButton", |
1262 IDS_APPS_DEVTOOL_DELETE_CONFIRMATION_BUTTON); | 1263 IDS_APPS_DEVTOOL_DELETE_CONFIRMATION_BUTTON); |
1263 SET_STRING("deleteConfirmationTitle", | 1264 SET_STRING("deleteConfirmationTitle", |
1264 IDS_APPS_DEVTOOL_DELETE_CONFIRMATION_TITLE); | 1265 IDS_APPS_DEVTOOL_DELETE_CONFIRMATION_TITLE); |
1265 SET_STRING("deleteConfirmationMessageApp", | 1266 SET_STRING("deleteConfirmationMessageApp", |
1266 IDS_APPS_DEVTOOL_DELETE_CONFIRMATION_MESSAGE_APP); | 1267 IDS_APPS_DEVTOOL_DELETE_CONFIRMATION_MESSAGE_APP); |
1267 SET_STRING("deleteConfirmationMessageExtension", | 1268 SET_STRING("deleteConfirmationMessageExtension", |
1268 IDS_APPS_DEVTOOL_DELETE_CONFIRMATION_MESSAGE_EXTENSION); | 1269 IDS_APPS_DEVTOOL_DELETE_CONFIRMATION_MESSAGE_EXTENSION); |
1269 | 1270 |
1271 // Dialog when profile is managed. | |
1272 SET_STRING("managedProfileDialogCloseButton", | |
1273 IDS_APPS_DEVTOOL_MANAGED_PROFILE_DIALOG_CLOSE_BUTTON); | |
1274 SET_STRING("managedProfileDialogTitle", | |
1275 IDS_APPS_DEVTOOL_MANAGED_PROFILE_DIALOG_TITLE); | |
1276 SET_STRING("managedProfileDialogDescription", | |
1277 IDS_APPS_DEVTOOL_MANAGED_PROFILE_DIALOG_DESCRIPTION); | |
1278 | |
1270 #undef SET_STRING | 1279 #undef SET_STRING |
1271 return true; | 1280 return true; |
1272 } | 1281 } |
1273 | 1282 |
1274 DeveloperPrivateGetStringsFunction::~DeveloperPrivateGetStringsFunction() {} | 1283 DeveloperPrivateGetStringsFunction::~DeveloperPrivateGetStringsFunction() {} |
1275 | 1284 |
1285 bool DeveloperPrivateIsProfileManagedFunction::RunImpl() { | |
1286 SetResult(new base::FundamentalValue(profile_->IsManaged())); | |
1287 return true; | |
1288 } | |
1289 | |
1290 DeveloperPrivateIsProfileManagedFunction:: | |
1291 ~DeveloperPrivateIsProfileManagedFunction() { | |
1292 } | |
1293 | |
1276 } // namespace api | 1294 } // namespace api |
1277 | 1295 |
1278 } // namespace extensions | 1296 } // namespace extensions |
OLD | NEW |