Commit b06d77da authored by dpapad's avatar dpapad Committed by Commit Bot

Extensions WebUI: Remove unused strings, move remaining to dedicated file.

Bug: None
Change-Id: Ibb2e05e68dce90a0cc41a8e6e88b497fd4f683c0
Reviewed-on: https://chromium-review.googlesource.com/1066918Reviewed-by: default avatarDevlin <rdevlin.cronin@chromium.org>
Commit-Queue: Demetrios Papadopoulos <dpapad@chromium.org>
Cr-Commit-Position: refs/heads/master@{#560309}
parent ad68c222
...@@ -2987,41 +2987,6 @@ ...@@ -2987,41 +2987,6 @@
Aw, Snap! There was an error during renaming. Aw, Snap! There was an error during renaming.
</message> </message>
<!-- Extensions Kiosk apps -->
<message name="IDS_EXTENSIONS_ADD_KIOSK_APP_BUTTON" desc="Label of the button to bring up kiosk management overlay on chrome extensions page.">
Manage kiosk applications...
</message>
<message name="IDS_EXTENSIONS_KIOSK_OVERLAY_TITLE" desc="The title text of the kiosk settings overlay.">
Manage Kiosk Applications
</message>
<message name="IDS_EXTENSIONS_KIOSK_ADD_APP" desc="Label above the application id text input in the kiosk settings overlay.">
Add kiosk application:
</message>
<message name="IDS_EXTENSIONS_KIOSK_ADD_APP_HINT" desc="Placeholder hint in the application id text input in the kiosk settings overlay.">
Enter application id or webstore URL.
</message>
<message name="IDS_EXTENSIONS_KIOSK_ENABLE_AUTO_LAUNCH" desc="Text for a button that enables an application to auto launch on startup in the kiosk settings overlay.">
Set to auto-launch
</message>
<message name="IDS_EXTENSIONS_KIOSK_DISABLE_AUTO_LAUNCH" desc="Text for a button that disables an application to auto launch on startup in the kiosk settings overlay.">
Disable auto-launch
</message>
<message name="IDS_EXTENSIONS_KIOSK_AUTO_LAUNCH" desc="Text shows besides an application that is set to auto launch on start up in the kiosk settings overlay.">
(auto-launched)
</message>
<message name="IDS_EXTENSIONS_KIOSK_INVALID_APP" desc="Text shows besides an application that is not valid in the kiosk settings overlay.">
Invalid application.
</message>
<message name="IDS_EXTENSIONS_KIOSK_DISABLE_BAILOUT_SHORTCUT_LABEL" desc="Label text for a checkbox to disable kiosk application launch bail out shortcut.">
Permanently keep this device in kiosk mode.
</message>
<message name="IDS_EXTENSIONS_KIOSK_DISABLE_BAILOUT_SHORTCUT_WARNING_BOLD" desc="Bold text of the warning dialog for disabling kiosk application launch bail out shortcut.">
Are you sure you want to permanently keep this device in kiosk mode?
</message>
<message name="IDS_EXTENSIONS_KIOSK_DISABLE_BAILOUT_SHORTCUT_WARNING_FORMAT" desc="Warning text of disabling kiosk application launch bail out shortcut.">
The only way to undo this is to re-install <ph name="IDS_SHORT_PRODUCT_OS_NAME">$1<ex>Chrome OS</ex></ph>.
</message>
<!-- Keyboard overlay UI --> <!-- Keyboard overlay UI -->
<message name="IDS_KEYBOARD_OVERLAY_TITLE" desc="The title of the keyboard overlay."> <message name="IDS_KEYBOARD_OVERLAY_TITLE" desc="The title of the keyboard overlay.">
Keyboard Overlay Keyboard Overlay
......
...@@ -3917,67 +3917,17 @@ are declared in build/common.gypi. ...@@ -3917,67 +3917,17 @@ are declared in build/common.gypi.
The folder you selected contains sensitive files. Are you sure you want to grant "$1" permanent write access to this folder? The folder you selected contains sensitive files. Are you sure you want to grant "$1" permanent write access to this folder?
</message> </message>
<!-- chrome://settings/extensions page --> <!-- Extensions strings, which are not used by chrome://extensions. -->
<!-- TODO(devlin): Move these strings to -->
<!-- chrome/app/md_extensions_strings.grdp. -->
<if expr="enable_extensions"> <if expr="enable_extensions">
<message name="IDS_EXTENSIONS_INSTALL_DROP_TARGET" desc="Text on drop target for installing extensions.">
Drop to install
</message>
<message name="IDS_EXTENSIONS_VIEW_INCOGNITO" desc="Text that signifies that the extension view is in an incognito process.">
(Incognito)
</message>
<message name="IDS_EXTENSIONS_VIEW_INACTIVE" desc="Text that signifies that the extension view is an inactive transient page.">
(Inactive)
</message>
<message name="IDS_EXTENSIONS_VIEW_IFRAME" desc="Text that signifies that the extension view is an iframe.">
(iframe)
</message>
<message name="IDS_EXTENSIONS_BACKGROUND_PAGE" desc="Display name for an autogenerated background page.">
background page
</message>
<message name="IDS_EXTENSIONS_PATH" desc="The label in front of the extension load path.">
Loaded from:
</message>
<message name="IDS_EXTENSIONS_INSTALL_WARNINGS" desc="The text which says that an extension has warnings when it was installed.">
There were warnings when trying to install this extension:
</message>
<message name="IDS_EXTENSIONS_LOAD_ERROR_HEADING" desc="The title of the section that describes an extension load error."> <message name="IDS_EXTENSIONS_LOAD_ERROR_HEADING" desc="The title of the section that describes an extension load error.">
Error Loading Extension Error Loading Extension
</message> </message>
<message name="IDS_EXTENSIONS_LOAD_ERROR_MESSAGE" desc="The message which tells the user that an extension failed to load."> <message name="IDS_EXTENSIONS_LOAD_ERROR_MESSAGE" desc="The message which tells the user that an extension failed to load.">
Failed to load extension from: Failed to load extension from:
</message> </message>
<message name="IDS_EXTENSIONS_ERROR_NO_ERRORS_CODE_MESSAGE" desc="The text displayed in the 'code' section when an extension has no errors.">
Nothing to see here, move along.
</message>
<message name="IDS_EXTENSIONS_ENABLE_ERROR_COLLECTION" desc="The checkbox for enabling error collection for an extension.">
Collect errors
</message>
<message name="IDS_EXTENSIONS_ALLOW_ON_ALL_URLS" desc="The checkbox for allowing an extension to run scripts on all websites without explicit permission.">
Allow on all websites
</message>
<message name="IDS_EXTENSIONS_ALLOW_FILE_ACCESS" desc="The checkbox for allowing an extension access to run scripts on file URLs.">
Allow access to file URLs
</message>
<message name="IDS_EXTENSIONS_RELOAD_TERMINATED" desc="The link for reloading extensions.">
Reload
</message>
<message name="IDS_EXTENSIONS_REPAIR_CORRUPTED" desc="The link for repairing corrupted extensions.">
Repair
</message>
<message name="IDS_EXTENSIONS_OPTIONS_LINK" desc="The link text for the Options link."> <message name="IDS_EXTENSIONS_OPTIONS_LINK" desc="The link text for the Options link.">
Options Options
</message> </message>
<message name="IDS_EXTENSIONS_LOG_LEVEL_INFO" desc="Alt-text indicating a low severity level for the error icon in the chrome://extensions page.">
Log
</message>
<message name="IDS_EXTENSIONS_LOG_LEVEL_WARN" desc="Alt-text indicating a medium severity level for the error icon in the chrome://extensions page.">
Warning
</message>
<message name="IDS_EXTENSIONS_LOG_LEVEL_ERROR" desc="Alt-text indicating a high severity level for the error icon in the chrome://extensions page.">
Error
</message>
<if expr="not use_titlecase"> <if expr="not use_titlecase">
<message name="IDS_EXTENSIONS_CONTEXT_MENU_PAGE_ACCESS" desc="The label in an extension's context menu for the submenu specifying whether or not the extension can run on the current page (sentence case)."> <message name="IDS_EXTENSIONS_CONTEXT_MENU_PAGE_ACCESS" desc="The label in an extension's context menu for the submenu specifying whether or not the extension can run on the current page (sentence case).">
Allow access Allow access
...@@ -4234,9 +4184,6 @@ Keep your key file in a safe place. You will need it to create new versions of y ...@@ -4234,9 +4184,6 @@ Keep your key file in a safe place. You will need it to create new versions of y
<message name="IDS_EXTENSIONS_DISABLE_DEVELOPER_MODE_BODY" desc="Body of a dialog warning users they have development mode extensions running"> <message name="IDS_EXTENSIONS_DISABLE_DEVELOPER_MODE_BODY" desc="Body of a dialog warning users they have development mode extensions running">
Extensions running in developer mode can harm your computer. If you're not a developer, you should disable these extensions running in developer mode to stay safe. Extensions running in developer mode can harm your computer. If you're not a developer, you should disable these extensions running in developer mode to stay safe.
</message> </message>
<message name="IDS_EXTENSIONS_CORRUPTED_EXTENSION" desc="The warning for the user that an extension may have been tampered with on disk.">
This extension may have been corrupted.
</message>
<!-- Settings API bubble --> <!-- Settings API bubble -->
<message name="IDS_EXTENSIONS_SETTINGS_API_TITLE_HOME_PAGE_BUBBLE" desc="Title of a bubble warning users that an extension has overridden their home page setting"> <message name="IDS_EXTENSIONS_SETTINGS_API_TITLE_HOME_PAGE_BUBBLE" desc="Title of a bubble warning users that an extension has overridden their home page setting">
......
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<!-- MD Extensions strings (included from generated_resources.grd). --> <!-- MD Extensions strings (included from generated_resources.grd). -->
<grit-part> <grit-part>
<message name="IDS_EXTENSIONS_ALLOW_FILE_ACCESS" desc="The checkbox for allowing an extension access to run scripts on file URLs.">
Allow access to file URLs
</message>
<message name="IDS_EXTENSIONS_ALLOW_ON_ALL_URLS" desc="The checkbox for allowing an extension to run scripts on all websites without explicit permission.">
Allow on all websites
</message>
<message name="IDS_EXTENSIONS_BACKGROUND_PAGE" desc="Display name for an autogenerated background page.">
background page
</message>
<message name="IDS_EXTENSIONS_CORRUPTED_EXTENSION" desc="The warning for the user that an extension may have been tampered with on disk.">
This extension may have been corrupted.
</message>
<message name="IDS_EXTENSIONS_ENABLE_ERROR_COLLECTION" desc="The checkbox for enabling error collection for an extension.">
Collect errors
</message>
<message name="IDS_EXTENSIONS_ERROR_NO_ERRORS_CODE_MESSAGE" desc="The text displayed in the 'code' section when an extension has no errors.">
Nothing to see here, move along.
</message>
<message name="IDS_EXTENSIONS_INSTALL_DROP_TARGET" desc="Text on drop target for installing extensions.">
Drop to install
</message>
<message name="IDS_EXTENSIONS_INSTALL_WARNINGS" desc="The text which says that an extension has warnings when it was installed.">
There were warnings when trying to install this extension:
</message>
<message name="IDS_EXTENSIONS_LOG_LEVEL_ERROR" desc="Alt-text indicating a high severity level for the error icon in the chrome://extensions page.">
Error
</message>
<message name="IDS_EXTENSIONS_LOG_LEVEL_INFO" desc="Alt-text indicating a low severity level for the error icon in the chrome://extensions page.">
Log
</message>
<message name="IDS_EXTENSIONS_LOG_LEVEL_WARN" desc="Alt-text indicating a medium severity level for the error icon in the chrome://extensions page.">
Warning
</message>
<message name="IDS_EXTENSIONS_PATH" desc="The label in front of the extension load path.">
Loaded from:
</message>
<message name="IDS_EXTENSIONS_RELOAD_TERMINATED" desc="The link for reloading extensions.">
Reload
</message>
<message name="IDS_EXTENSIONS_REPAIR_CORRUPTED" desc="The link for repairing corrupted extensions.">
Repair
</message>
<message name="IDS_EXTENSIONS_VIEW_IFRAME" desc="Text that signifies that the extension view is an iframe.">
(iframe)
</message>
<message name="IDS_EXTENSIONS_VIEW_INACTIVE" desc="Text that signifies that the extension view is an inactive transient page.">
(Inactive)
</message>
<message name="IDS_EXTENSIONS_VIEW_INCOGNITO" desc="Text that signifies that the extension view is in an incognito process.">
(Incognito)
</message>
<message name="IDS_MD_EXTENSIONS_DEVELOPER_MODE" desc="The text displayed next to the checkbox to toggle developer mode in the extensions page."> <message name="IDS_MD_EXTENSIONS_DEVELOPER_MODE" desc="The text displayed next to the checkbox to toggle developer mode in the extensions page.">
Developer mode Developer mode
</message> </message>
......
...@@ -21,15 +21,12 @@ ...@@ -21,15 +21,12 @@
#include "chrome/browser/chromeos/ownership/owner_settings_service_chromeos.h" #include "chrome/browser/chromeos/ownership/owner_settings_service_chromeos.h"
#include "chrome/browser/chromeos/profiles/profile_helper.h" #include "chrome/browser/chromeos/profiles/profile_helper.h"
#include "chrome/browser/chromeos/settings/cros_settings.h" #include "chrome/browser/chromeos/settings/cros_settings.h"
#include "chrome/grit/chromium_strings.h"
#include "chrome/grit/generated_resources.h"
#include "chromeos/chromeos_switches.h" #include "chromeos/chromeos_switches.h"
#include "chromeos/settings/cros_settings_names.h" #include "chromeos/settings/cros_settings_names.h"
#include "components/crx_file/id_util.h" #include "components/crx_file/id_util.h"
#include "components/strings/grit/components_strings.h" #include "components/strings/grit/components_strings.h"
#include "components/user_manager/user_manager.h" #include "components/user_manager/user_manager.h"
#include "content/public/browser/web_ui.h" #include "content/public/browser/web_ui.h"
#include "content/public/browser/web_ui_data_source.h"
#include "extensions/common/extension_urls.h" #include "extensions/common/extension_urls.h"
#include "extensions/grit/extensions_browser_resources.h" #include "extensions/grit/extensions_browser_resources.h"
#include "ui/base/l10n/l10n_util.h" #include "ui/base/l10n/l10n_util.h"
...@@ -158,52 +155,6 @@ void KioskAppsHandler::RegisterMessages() { ...@@ -158,52 +155,6 @@ void KioskAppsHandler::RegisterMessages() {
base::Unretained(this))); base::Unretained(this)));
} }
void KioskAppsHandler::GetLocalizedValues(content::WebUIDataSource* source) {
source->AddString(
"addKioskAppButton",
l10n_util::GetStringUTF16(IDS_EXTENSIONS_ADD_KIOSK_APP_BUTTON));
source->AddString(
"kioskOverlayTitle",
l10n_util::GetStringUTF16(IDS_EXTENSIONS_KIOSK_OVERLAY_TITLE));
source->AddString("addKioskApp",
l10n_util::GetStringUTF16(IDS_EXTENSIONS_KIOSK_ADD_APP));
source->AddString(
"kioskAppIdEditHint",
l10n_util::GetStringUTF16(IDS_EXTENSIONS_KIOSK_ADD_APP_HINT));
source->AddString(
"enableAutoLaunchButton",
l10n_util::GetStringUTF16(IDS_EXTENSIONS_KIOSK_ENABLE_AUTO_LAUNCH));
source->AddString(
"disableAutoLaunchButton",
l10n_util::GetStringUTF16(IDS_EXTENSIONS_KIOSK_DISABLE_AUTO_LAUNCH));
source->AddString("autoLaunch", l10n_util::GetStringUTF16(
IDS_EXTENSIONS_KIOSK_AUTO_LAUNCH));
source->AddString("invalidApp", l10n_util::GetStringUTF16(
IDS_EXTENSIONS_KIOSK_INVALID_APP));
source->AddString("kioskDiableBailoutShortcutLabel",
l10n_util::GetStringUTF16(
IDS_EXTENSIONS_KIOSK_DISABLE_BAILOUT_SHORTCUT_LABEL));
source->AddString(
"kioskDisableBailoutShortcutWarningBold",
l10n_util::GetStringUTF16(
IDS_EXTENSIONS_KIOSK_DISABLE_BAILOUT_SHORTCUT_WARNING_BOLD));
const base::string16 product_os_name =
l10n_util::GetStringUTF16(IDS_SHORT_PRODUCT_OS_NAME);
source->AddString(
"kioskDisableBailoutShortcutWarning",
l10n_util::GetStringFUTF16(
IDS_EXTENSIONS_KIOSK_DISABLE_BAILOUT_SHORTCUT_WARNING_FORMAT,
product_os_name));
source->AddString(
"kioskDisableBailoutShortcutConfirm",
l10n_util::GetStringUTF16(IDS_CONFIRM_MESSAGEBOX_YES_BUTTON_LABEL));
source->AddString(
"kioskDisableBailoutShortcutCancel",
l10n_util::GetStringUTF16(IDS_CONFIRM_MESSAGEBOX_NO_BUTTON_LABEL));
source->AddString("done", l10n_util::GetStringUTF16(IDS_DONE));
source->AddString("add", l10n_util::GetStringUTF16(IDS_ADD));
}
void KioskAppsHandler::OnKioskAppDataChanged(const std::string& app_id) { void KioskAppsHandler::OnKioskAppDataChanged(const std::string& app_id) {
UpdateApp(app_id); UpdateApp(app_id);
} }
......
...@@ -18,10 +18,6 @@ namespace base { ...@@ -18,10 +18,6 @@ namespace base {
class ListValue; class ListValue;
} }
namespace content {
class WebUIDataSource;
}
namespace chromeos { namespace chromeos {
class KioskAppManager; class KioskAppManager;
...@@ -33,8 +29,6 @@ class KioskAppsHandler : public content::WebUIMessageHandler, ...@@ -33,8 +29,6 @@ class KioskAppsHandler : public content::WebUIMessageHandler,
explicit KioskAppsHandler(OwnerSettingsServiceChromeOS* service); explicit KioskAppsHandler(OwnerSettingsServiceChromeOS* service);
~KioskAppsHandler() override; ~KioskAppsHandler() override;
void GetLocalizedValues(content::WebUIDataSource* source);
// content::WebUIMessageHandler overrides: // content::WebUIMessageHandler overrides:
void RegisterMessages() override; void RegisterMessages() override;
void OnJavascriptAllowed() override; void OnJavascriptAllowed() override;
......
...@@ -331,9 +331,7 @@ ExtensionsUI::ExtensionsUI(content::WebUI* web_ui) : WebUIController(web_ui) { ...@@ -331,9 +331,7 @@ ExtensionsUI::ExtensionsUI(content::WebUI* web_ui) : WebUIController(web_ui) {
auto kiosk_app_handler = std::make_unique<chromeos::KioskAppsHandler>( auto kiosk_app_handler = std::make_unique<chromeos::KioskAppsHandler>(
chromeos::OwnerSettingsServiceChromeOSFactory::GetForBrowserContext( chromeos::OwnerSettingsServiceChromeOSFactory::GetForBrowserContext(
profile)); profile));
chromeos::KioskAppsHandler* kiosk_handler = kiosk_app_handler.get();
web_ui->AddMessageHandler(std::move(kiosk_app_handler)); web_ui->AddMessageHandler(std::move(kiosk_app_handler));
kiosk_handler->GetLocalizedValues(source);
#endif #endif
// Need to allow <object> elements so that the <extensionoptions> browser // Need to allow <object> elements so that the <extensionoptions> browser
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment