summaryrefslogtreecommitdiffstats
path: root/chrome/default_plugin
diff options
context:
space:
mode:
authorananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-10 22:49:56 +0000
committerananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-10 22:49:56 +0000
commitc20436859b9eeca254bdea4dda52e29ba34fc612 (patch)
treec101ab72721c57fed07425a27490755732844bb3 /chrome/default_plugin
parent40a3a6590c76d93cd13d16440b1d84d956b71d58 (diff)
downloadchromium_src-c20436859b9eeca254bdea4dda52e29ba34fc612.zip
chromium_src-c20436859b9eeca254bdea4dda52e29ba34fc612.tar.gz
chromium_src-c20436859b9eeca254bdea4dda52e29ba34fc612.tar.bz2
Moving some of the webkit_glue functions from chrome\common\common_glue and chrome\renderer\chrome_renderer_glue.cc
to content\renderer. This helps reduce some of the implicit dependencies of content on chrome and will help in building it as a dll. There is just one function GetProductVersion remaining in chrome_renderer_glue. This function is used to build the user agent string in the embedder. This functionality will be moved to the ContentRendererClient object in a subsequent CL. Moved the PPAPI PDF plugin implementation to chrome renderer. This interface is returned by the PPAPI factory which is registered by the renderer during startup. BUG=82454 Review URL: http://codereview.chromium.org/6995119 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@88742 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/default_plugin')
-rw-r--r--chrome/default_plugin/install_dialog.cc5
-rw-r--r--chrome/default_plugin/plugin_impl_mac.mm3
-rw-r--r--chrome/default_plugin/plugin_impl_win.cc13
3 files changed, 12 insertions, 9 deletions
diff --git a/chrome/default_plugin/install_dialog.cc b/chrome/default_plugin/install_dialog.cc
index 87de98b..6462387 100644
--- a/chrome/default_plugin/install_dialog.cc
+++ b/chrome/default_plugin/install_dialog.cc
@@ -10,6 +10,7 @@
#include "base/string_util.h"
#include "chrome/default_plugin/plugin_impl.h"
#include "grit/webkit_strings.h"
+#include "ui/base/l10n/l10n_util.h"
#include "webkit/glue/webkit_glue.h"
typedef base::hash_map<const std::wstring, PluginInstallDialog*> DialogMap;
@@ -149,13 +150,13 @@ LRESULT PluginInstallDialog::OnInitDialog(UINT message, WPARAM wparam,
SetWindowText(dialog_title.c_str());
std::wstring get_the_plugin_btn_msg =
- webkit_glue::GetLocalizedString(
+ l10n_util::GetStringUTF16(
IDS_DEFAULT_PLUGIN_GET_THE_PLUGIN_BTN_MSG);
AdjustTextDirectionality(&get_the_plugin_btn_msg);
SetDlgItemText(IDB_GET_THE_PLUGIN, get_the_plugin_btn_msg.c_str());
std::wstring cancel_plugin_download_msg =
- webkit_glue::GetLocalizedString(
+ l10n_util::GetStringUTF16(
IDS_DEFAULT_PLUGIN_CANCEL_PLUGIN_DOWNLOAD_MSG);
AdjustTextDirectionality(&cancel_plugin_download_msg);
SetDlgItemText(IDCANCEL, cancel_plugin_download_msg.c_str());
diff --git a/chrome/default_plugin/plugin_impl_mac.mm b/chrome/default_plugin/plugin_impl_mac.mm
index 6ab3539..a2bc2db 100644
--- a/chrome/default_plugin/plugin_impl_mac.mm
+++ b/chrome/default_plugin/plugin_impl_mac.mm
@@ -13,6 +13,7 @@
#include "googleurl/src/gurl.h"
#include "grit/default_plugin_resources.h"
#include "grit/webkit_strings.h"
+#include "ui/base/l10n/l10n_util.h"
#include "ui/base/l10n/l10n_util_mac.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/gfx/image.h"
@@ -47,7 +48,7 @@ bool PluginInstallerImpl::Initialize(void* module_handle, NPP instance,
instance_ = instance;
mime_type_ = mime_type;
- command_ = [l10n_util::FixUpWindowsStyleLabel(webkit_glue::GetLocalizedString(
+ command_ = [l10n_util::FixUpWindowsStyleLabel(l10n_util::GetStringUTF16(
IDS_DEFAULT_PLUGIN_NO_PLUGIN_AVAILABLE_MSG)) retain];
ResourceBundle& rb = ResourceBundle::GetSharedInstance();
diff --git a/chrome/default_plugin/plugin_impl_win.cc b/chrome/default_plugin/plugin_impl_win.cc
index 9e7c8fb..90c604f 100644
--- a/chrome/default_plugin/plugin_impl_win.cc
+++ b/chrome/default_plugin/plugin_impl_win.cc
@@ -16,6 +16,7 @@
#include "googleurl/src/gurl.h"
#include "grit/webkit_strings.h"
#include "net/base/net_errors.h"
+#include "ui/base/l10n/l10n_util.h"
#include "unicode/locid.h"
#include "webkit/glue/webkit_glue.h"
#include "webkit/plugins/npapi/default_plugin_shared.h"
@@ -202,8 +203,8 @@ void PluginInstallerImpl::DisplayAvailablePluginStatus() {
IDS_DEFAULT_PLUGIN_GET_PLUGIN_MSG_NO_PLUGIN_NAME,
plugin_name_);
optional_additional_message_ =
- webkit_glue::GetLocalizedString(IDS_DEFAULT_PLUGIN_GET_PLUGIN_MSG_2);
- get_plugin_link_message_ = webkit_glue::GetLocalizedString(
+ l10n_util::GetStringUTF16(IDS_DEFAULT_PLUGIN_GET_PLUGIN_MSG_2);
+ get_plugin_link_message_ = l10n_util::GetStringUTF16(
IDS_DEFAULT_PLUGIN_GET_THE_PLUGIN_BTN_MSG);
RefreshDisplay();
}
@@ -211,13 +212,13 @@ void PluginInstallerImpl::DisplayAvailablePluginStatus() {
void PluginInstallerImpl::DisplayStatus(int message_resource_id) {
ClearDisplay();
command_ =
- webkit_glue::GetLocalizedString(message_resource_id);
+ l10n_util::GetStringUTF16(message_resource_id);
RefreshDisplay();
}
void PluginInstallerImpl::DisplayPluginDownloadFailedStatus() {
ClearDisplay();
- command_ = webkit_glue::GetLocalizedString(
+ command_ = l10n_util::GetStringUTF16(
IDS_DEFAULT_PLUGIN_DOWNLOAD_FAILED_MSG);
command_ = ReplaceStringPlaceholders(
command_,
@@ -287,10 +288,10 @@ std::wstring PluginInstallerImpl::ReplaceStringForPossibleEmptyReplacement(
// placeholder with the replacement_string. Otherwise return the string
// identified by resource id messsage_id_without_placeholders.
if (replacement_string.empty()) {
- return webkit_glue::GetLocalizedString(messsage_id_without_placeholders);
+ return l10n_util::GetStringUTF16(messsage_id_without_placeholders);
} else {
std::wstring string_with_placeholders =
- webkit_glue::GetLocalizedString(message_id_with_placeholders);
+ l10n_util::GetStringUTF16(message_id_with_placeholders);
return ReplaceStringPlaceholders(string_with_placeholders,
replacement_string, NULL);
}