| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/common/extensions/chrome_extensions_client.h" | 5 #include "chrome/common/extensions/chrome_extensions_client.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
| 9 #include "base/strings/string_util.h" | 9 #include "base/strings/string_util.h" |
| 10 #include "base/values.h" | 10 #include "base/values.h" |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 PermissionsInfo::GetInstance()->AddProvider(chrome_api_permissions_); | 96 PermissionsInfo::GetInstance()->AddProvider(chrome_api_permissions_); |
| 97 PermissionsInfo::GetInstance()->AddProvider(extensions_api_permissions_); | 97 PermissionsInfo::GetInstance()->AddProvider(extensions_api_permissions_); |
| 98 | 98 |
| 99 // Set up the scripting whitelist. | 99 // Set up the scripting whitelist. |
| 100 // Whitelist ChromeVox, an accessibility extension from Google that needs | 100 // Whitelist ChromeVox, an accessibility extension from Google that needs |
| 101 // the ability to script webui pages. This is temporary and is not | 101 // the ability to script webui pages. This is temporary and is not |
| 102 // meant to be a general solution. | 102 // meant to be a general solution. |
| 103 // TODO(dmazzoni): remove this once we have an extension API that | 103 // TODO(dmazzoni): remove this once we have an extension API that |
| 104 // allows any extension to request read-only access to webui pages. | 104 // allows any extension to request read-only access to webui pages. |
| 105 scripting_whitelist_.push_back(extension_misc::kChromeVoxExtensionId); | 105 scripting_whitelist_.push_back(extension_misc::kChromeVoxExtensionId); |
| 106 | |
| 107 // Whitelist "Discover DevTools Companion" extension from Google that | |
| 108 // needs the ability to script DevTools pages. Companion will assist | |
| 109 // online courses and will be needed while the online educational programs | |
| 110 // are in place. | |
| 111 scripting_whitelist_.push_back("angkfkebojeancgemegoedelbnjgcgme"); | |
| 112 } | 106 } |
| 113 | 107 |
| 114 const PermissionMessageProvider& | 108 const PermissionMessageProvider& |
| 115 ChromeExtensionsClient::GetPermissionMessageProvider() const { | 109 ChromeExtensionsClient::GetPermissionMessageProvider() const { |
| 116 return permission_message_provider_; | 110 return permission_message_provider_; |
| 117 } | 111 } |
| 118 | 112 |
| 119 const std::string ChromeExtensionsClient::GetProductName() { | 113 const std::string ChromeExtensionsClient::GetProductName() { |
| 120 return l10n_util::GetStringUTF8(IDS_PRODUCT_NAME); | 114 return l10n_util::GetStringUTF8(IDS_PRODUCT_NAME); |
| 121 } | 115 } |
| (...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 369 | 363 |
| 370 return image_paths; | 364 return image_paths; |
| 371 } | 365 } |
| 372 | 366 |
| 373 // static | 367 // static |
| 374 ChromeExtensionsClient* ChromeExtensionsClient::GetInstance() { | 368 ChromeExtensionsClient* ChromeExtensionsClient::GetInstance() { |
| 375 return g_client.Pointer(); | 369 return g_client.Pointer(); |
| 376 } | 370 } |
| 377 | 371 |
| 378 } // namespace extensions | 372 } // namespace extensions |
| OLD | NEW |