summaryrefslogtreecommitdiffstats
path: root/webkit/plugins
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-29 19:21:31 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-29 19:21:31 +0000
commit8275835e508fb36328dd79c338d31bbf98eadf56 (patch)
treef78d6d976f6bad03de09a82d550943068db096a3 /webkit/plugins
parent460d2fd0876fddb9e6a2a17cba9c70beb93dfa03 (diff)
downloadchromium_src-8275835e508fb36328dd79c338d31bbf98eadf56.zip
chromium_src-8275835e508fb36328dd79c338d31bbf98eadf56.tar.gz
chromium_src-8275835e508fb36328dd79c338d31bbf98eadf56.tar.bz2
Replace string16 with base::string16 in src/webkit
BUG= Review URL: https://codereview.chromium.org/13219005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@191421 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/plugins')
-rw-r--r--webkit/plugins/npapi/plugin_instance.cc2
-rw-r--r--webkit/plugins/npapi/plugin_instance.h2
-rw-r--r--webkit/plugins/npapi/plugin_lib_unittest.cc2
-rw-r--r--webkit/plugins/npapi/plugin_list.cc6
-rw-r--r--webkit/plugins/npapi/plugin_list.h2
-rw-r--r--webkit/plugins/npapi/plugin_list_mac.mm2
-rw-r--r--webkit/plugins/npapi/plugin_list_unittest.cc4
-rw-r--r--webkit/plugins/npapi/plugin_list_win.cc26
-rw-r--r--webkit/plugins/npapi/plugin_utils.cc2
-rw-r--r--webkit/plugins/npapi/plugin_utils.h2
-rw-r--r--webkit/plugins/npapi/webplugin_delegate.h2
-rw-r--r--webkit/plugins/npapi/webplugin_delegate_impl.cc2
-rw-r--r--webkit/plugins/npapi/webplugin_delegate_impl.h12
-rw-r--r--webkit/plugins/npapi/webplugin_delegate_impl_mac.mm6
-rw-r--r--webkit/plugins/npapi/webplugin_delegate_impl_win.cc15
-rw-r--r--webkit/plugins/npapi/webplugin_ime_win.cc4
-rw-r--r--webkit/plugins/npapi/webplugin_ime_win.h12
-rw-r--r--webkit/plugins/npapi/webplugin_impl.cc2
-rw-r--r--webkit/plugins/ppapi/event_conversion.cc2
-rw-r--r--webkit/plugins/ppapi/mock_plugin_delegate.cc5
-rw-r--r--webkit/plugins/ppapi/mock_plugin_delegate.h4
-rw-r--r--webkit/plugins/ppapi/plugin_delegate.h4
-rw-r--r--webkit/plugins/ppapi/ppapi_plugin_instance.cc36
-rw-r--r--webkit/plugins/ppapi/ppapi_plugin_instance.h20
-rw-r--r--webkit/plugins/webplugininfo.cc6
-rw-r--r--webkit/plugins/webplugininfo.h18
26 files changed, 103 insertions, 97 deletions
diff --git a/webkit/plugins/npapi/plugin_instance.cc b/webkit/plugins/npapi/plugin_instance.cc
index 0fcdb19..8e61f70 100644
--- a/webkit/plugins/npapi/plugin_instance.cc
+++ b/webkit/plugins/npapi/plugin_instance.cc
@@ -177,7 +177,7 @@ NPObject *PluginInstance::GetPluginScriptableObject() {
return value;
}
-bool PluginInstance::GetFormValue(string16* value) {
+bool PluginInstance::GetFormValue(base::string16* value) {
// Plugins will allocate memory for the return value by using NPN_MemAlloc().
char *plugin_value = NULL;
NPError error = NPP_GetValue(NPPVformValue, &plugin_value);
diff --git a/webkit/plugins/npapi/plugin_instance.h b/webkit/plugins/npapi/plugin_instance.h
index 25a1da8..9e3fb32 100644
--- a/webkit/plugins/npapi/plugin_instance.h
+++ b/webkit/plugins/npapi/plugin_instance.h
@@ -152,7 +152,7 @@ class PluginInstance : public base::RefCountedThreadSafe<PluginInstance> {
NPObject* GetPluginScriptableObject();
// Returns the form value of this instance.
- bool GetFormValue(string16* value);
+ bool GetFormValue(base::string16* value);
// WebViewDelegate methods that we implement. This is for handling
// callbacks during getURLNotify.
diff --git a/webkit/plugins/npapi/plugin_lib_unittest.cc b/webkit/plugins/npapi/plugin_lib_unittest.cc
index 5d6c803..f78459a 100644
--- a/webkit/plugins/npapi/plugin_lib_unittest.cc
+++ b/webkit/plugins/npapi/plugin_lib_unittest.cc
@@ -125,7 +125,7 @@ TEST(MIMEDescriptionParse, CornerCases) {
EXPECT_EQ("mime/type", types[0].mime_type);
EXPECT_EQ(1U, types[0].file_extensions.size());
EXPECT_EQ("ext1", types[0].file_extensions[0]);
- EXPECT_EQ(string16(), types[0].description);
+ EXPECT_EQ(base::string16(), types[0].description);
}
// This Java plugin has embedded semicolons in the mime type.
diff --git a/webkit/plugins/npapi/plugin_list.cc b/webkit/plugins/npapi/plugin_list.cc
index d82ae81..8856840 100644
--- a/webkit/plugins/npapi/plugin_list.cc
+++ b/webkit/plugins/npapi/plugin_list.cc
@@ -194,10 +194,10 @@ bool PluginList::ReadPluginInfo(const base::FilePath& filename,
bool PluginList::ParseMimeTypes(
const std::string& mime_types_str,
const std::string& file_extensions_str,
- const string16& mime_type_descriptions_str,
+ const base::string16& mime_type_descriptions_str,
std::vector<webkit::WebPluginMimeType>* parsed_mime_types) {
std::vector<std::string> mime_types, file_extensions;
- std::vector<string16> descriptions;
+ std::vector<base::string16> descriptions;
base::SplitString(mime_types_str, '|', &mime_types);
base::SplitString(file_extensions_str, '|', &file_extensions);
base::SplitString(mime_type_descriptions_str, '|', &descriptions);
@@ -220,7 +220,7 @@ bool PluginList::ParseMimeTypes(
// embedded in it (e.g. "SurfWriter file (*.swr)"). Remove an extension
// list from the description if it is present.
size_t ext = mime_type.description.find(ASCIIToUTF16("(*"));
- if (ext != string16::npos) {
+ if (ext != base::string16::npos) {
if (ext > 1 && mime_type.description[ext - 1] == ' ')
ext--;
diff --git a/webkit/plugins/npapi/plugin_list.h b/webkit/plugins/npapi/plugin_list.h
index dcf7af7..ebdaf3a 100644
--- a/webkit/plugins/npapi/plugin_list.h
+++ b/webkit/plugins/npapi/plugin_list.h
@@ -121,7 +121,7 @@ class WEBKIT_PLUGINS_EXPORT PluginList {
static bool ParseMimeTypes(
const std::string& mime_types,
const std::string& file_extensions,
- const string16& mime_type_descriptions,
+ const base::string16& mime_type_descriptions,
std::vector<webkit::WebPluginMimeType>* parsed_mime_types);
// Get all the plugins synchronously, loading them if necessary.
diff --git a/webkit/plugins/npapi/plugin_list_mac.mm b/webkit/plugins/npapi/plugin_list_mac.mm
index 3bdbfc8..66f3296 100644
--- a/webkit/plugins/npapi/plugin_list_mac.mm
+++ b/webkit/plugins/npapi/plugin_list_mac.mm
@@ -52,7 +52,7 @@ bool IsBlacklistedPlugin(const WebPluginInfo& info) {
// load them.
if (StartsWith(info.name, ASCIIToUTF16("Flip4Mac Windows Media"), false) &&
StartsWith(info.version, ASCIIToUTF16("2.3"), false)) {
- std::vector<string16> components;
+ std::vector<base::string16> components;
base::SplitString(info.version, '.', &components);
int bugfix_version = 0;
return (components.size() >= 3 &&
diff --git a/webkit/plugins/npapi/plugin_list_unittest.cc b/webkit/plugins/npapi/plugin_list_unittest.cc
index 0fc55bf..1358d19 100644
--- a/webkit/plugins/npapi/plugin_list_unittest.cc
+++ b/webkit/plugins/npapi/plugin_list_unittest.cc
@@ -71,8 +71,8 @@ TEST_F(PluginListTest, GetPlugins) {
TEST_F(PluginListTest, BadPluginDescription) {
WebPluginInfo plugin_3043(
- string16(), base::FilePath(FILE_PATH_LITERAL("/myplugin.3.0.43")),
- string16(), string16());
+ base::string16(), base::FilePath(FILE_PATH_LITERAL("/myplugin.3.0.43")),
+ base::string16(), base::string16());
// Simulate loading of the plugins.
plugin_list_.ClearPluginsToLoad();
plugin_list_.AddPluginToLoad(plugin_3043);
diff --git a/webkit/plugins/npapi/plugin_list_win.cc b/webkit/plugins/npapi/plugin_list_win.cc
index dd7e036..d27d81c 100644
--- a/webkit/plugins/npapi/plugin_list_win.cc
+++ b/webkit/plugins/npapi/plugin_list_win.cc
@@ -70,12 +70,12 @@ void GetExeDirectory(std::set<base::FilePath>* plugin_dirs) {
// Gets the installed path for a registered app.
bool GetInstalledPath(const char16* app, base::FilePath* out) {
- string16 reg_path(kRegistryApps);
+ base::string16 reg_path(kRegistryApps);
reg_path.append(L"\\");
reg_path.append(app);
base::win::RegKey hkcu_key(HKEY_CURRENT_USER, reg_path.c_str(), KEY_READ);
- string16 path;
+ base::string16 path;
// As of Win7 AppPaths can also be registered in HKCU: http://goo.gl/UgFOf.
if (base::win::GetVersion() >= base::win::VERSION_WIN7 &&
hkcu_key.ReadValue(kRegistryPath, &path) == ERROR_SUCCESS) {
@@ -95,17 +95,17 @@ bool GetInstalledPath(const char16* app, base::FilePath* out) {
// Search the registry at the given path and detect plugin directories.
void GetPluginsInRegistryDirectory(
HKEY root_key,
- const string16& registry_folder,
+ const base::string16& registry_folder,
std::set<base::FilePath>* plugin_dirs) {
for (base::win::RegistryKeyIterator iter(root_key, registry_folder.c_str());
iter.Valid(); ++iter) {
// Use the registry to gather plugin across the file system.
- string16 reg_path = registry_folder;
+ base::string16 reg_path = registry_folder;
reg_path.append(L"\\");
reg_path.append(iter.Name());
base::win::RegKey key(root_key, reg_path.c_str(), KEY_READ);
- string16 path;
+ base::string16 path;
if (key.ReadValue(kRegistryPath, &path) == ERROR_SUCCESS)
plugin_dirs->insert(base::FilePath(path));
}
@@ -117,10 +117,10 @@ void GetFirefoxInstalledPaths(std::vector<base::FilePath>* out) {
base::win::RegistryKeyIterator it(HKEY_LOCAL_MACHINE,
kRegistryFirefoxInstalled);
for (; it.Valid(); ++it) {
- string16 full_path = string16(kRegistryFirefoxInstalled) + L"\\" +
- it.Name() + L"\\Main";
+ base::string16 full_path = base::string16(kRegistryFirefoxInstalled) +
+ L"\\" + it.Name() + L"\\Main";
base::win::RegKey key(HKEY_LOCAL_MACHINE, full_path.c_str(), KEY_READ);
- string16 install_dir;
+ base::string16 install_dir;
if (key.ReadValue(L"Install Directory", &install_dir) != ERROR_SUCCESS)
continue;
out->push_back(base::FilePath(install_dir));
@@ -179,7 +179,7 @@ void GetJavaDirectory(std::set<base::FilePath>* plugin_dirs) {
KEY_QUERY_VALUE);
// 2. Read the current Java version
- string16 java_version;
+ base::string16 java_version;
if (java_key.ReadValue(kRegistryBrowserJavaVersion, &java_version) !=
ERROR_SUCCESS) {
java_key.ReadValue(kRegistryCurrentJavaVersion, &java_version);
@@ -190,7 +190,7 @@ void GetJavaDirectory(std::set<base::FilePath>* plugin_dirs) {
// 3. Install path of the JRE binaries is specified in "JavaHome"
// value under the Java version key.
- string16 java_plugin_directory;
+ base::string16 java_plugin_directory;
if (java_key.ReadValue(kRegistryJavaHome, &java_plugin_directory) ==
ERROR_SUCCESS) {
// 4. The new plugin resides under the 'bin/new_plugin'
@@ -234,8 +234,8 @@ bool HaveSharedMimeType(const webkit::WebPluginInfo& plugin1,
// Compares Windows style version strings (i.e. 1,2,3,4). Returns true if b's
// version is newer than a's, or false if it's equal or older.
-bool IsNewerVersion(const string16& a, const string16& b) {
- std::vector<string16> a_ver, b_ver;
+bool IsNewerVersion(const base::string16& a, const base::string16& b) {
+ std::vector<base::string16> a_ver, b_ver;
base::SplitString(a, ',', &a_ver);
base::SplitString(b, ',', &b_ver);
if (a_ver.size() == 1 && b_ver.size() == 1) {
@@ -299,7 +299,7 @@ void PluginList::GetPluginsInDir(
WIN32_FIND_DATA find_file_data;
HANDLE find_handle;
- string16 dir = path.value();
+ base::string16 dir = path.value();
// FindFirstFile requires that you specify a wildcard for directories.
dir.append(L"\\NP*.DLL");
diff --git a/webkit/plugins/npapi/plugin_utils.cc b/webkit/plugins/npapi/plugin_utils.cc
index 88710a5..df6efa6 100644
--- a/webkit/plugins/npapi/plugin_utils.cc
+++ b/webkit/plugins/npapi/plugin_utils.cc
@@ -13,7 +13,7 @@
namespace webkit {
namespace npapi {
-void CreateVersionFromString(const string16& version_string,
+void CreateVersionFromString(const base::string16& version_string,
Version* parsed_version) {
// Remove spaces and ')' from the version string,
// Replace any instances of 'r', ',' or '(' with a dot.
diff --git a/webkit/plugins/npapi/plugin_utils.h b/webkit/plugins/npapi/plugin_utils.h
index 77e65e6..438e879 100644
--- a/webkit/plugins/npapi/plugin_utils.h
+++ b/webkit/plugins/npapi/plugin_utils.h
@@ -16,7 +16,7 @@ namespace npapi {
// Parse a version string as used by a plug-in. This method is more lenient
// in accepting weird version strings than Version::GetFromString()
WEBKIT_PLUGINS_EXPORT void CreateVersionFromString(
- const string16& version_string,
+ const base::string16& version_string,
Version* parsed_version);
// Returns true iff NPAPI plugins are supported on the current platform.
diff --git a/webkit/plugins/npapi/webplugin_delegate.h b/webkit/plugins/npapi/webplugin_delegate.h
index 6218415a7..4c0eb42 100644
--- a/webkit/plugins/npapi/webplugin_delegate.h
+++ b/webkit/plugins/npapi/webplugin_delegate.h
@@ -85,7 +85,7 @@ class WEBKIT_PLUGINS_EXPORT WebPluginDelegate {
// Gets the form value associated with the plugin instance.
// Returns false if the value is not available.
- virtual bool GetFormValue(string16* value) = 0;
+ virtual bool GetFormValue(base::string16* value) = 0;
// Receives notification about a resource load that the plugin initiated
// for a frame.
diff --git a/webkit/plugins/npapi/webplugin_delegate_impl.cc b/webkit/plugins/npapi/webplugin_delegate_impl.cc
index 0c4ae87..08170a3 100644
--- a/webkit/plugins/npapi/webplugin_delegate_impl.cc
+++ b/webkit/plugins/npapi/webplugin_delegate_impl.cc
@@ -185,7 +185,7 @@ NPObject* WebPluginDelegateImpl::GetPluginScriptableObject() {
return instance_->GetPluginScriptableObject();
}
-bool WebPluginDelegateImpl::GetFormValue(string16* value) {
+bool WebPluginDelegateImpl::GetFormValue(base::string16* value) {
return instance_->GetFormValue(value);
}
diff --git a/webkit/plugins/npapi/webplugin_delegate_impl.h b/webkit/plugins/npapi/webplugin_delegate_impl.h
index aa95072..7afc9de 100644
--- a/webkit/plugins/npapi/webplugin_delegate_impl.h
+++ b/webkit/plugins/npapi/webplugin_delegate_impl.h
@@ -85,9 +85,9 @@ class WEBKIT_PLUGINS_EXPORT WebPluginDelegateImpl : public WebPluginDelegate {
#if defined(OS_WIN)
static bool IsPluginDelegateWindow(HWND window);
static bool GetPluginNameFromWindow(HWND window,
- string16* plugin_name);
+ base::string16* plugin_name);
static bool GetPluginVersionFromWindow(HWND window,
- string16* plugin_version);
+ base::string16* plugin_version);
// Returns true if the window handle passed in is that of the dummy
// activation window for windowless plugins.
@@ -112,7 +112,7 @@ class WEBKIT_PLUGINS_EXPORT WebPluginDelegateImpl : public WebPluginDelegate {
virtual bool HandleInputEvent(const WebKit::WebInputEvent& event,
WebKit::WebCursorInfo* cursor_info) OVERRIDE;
virtual NPObject* GetPluginScriptableObject() OVERRIDE;
- virtual bool GetFormValue(string16* value) OVERRIDE;
+ virtual bool GetFormValue(base::string16* value) OVERRIDE;
virtual void DidFinishLoadWithReason(const GURL& url,
NPReason reason,
int notify_id) OVERRIDE;
@@ -152,14 +152,14 @@ class WEBKIT_PLUGINS_EXPORT WebPluginDelegateImpl : public WebPluginDelegate {
#if defined(OS_WIN)
// Informs the plug-in that an IME has changed its status.
- void ImeCompositionUpdated(const string16& text,
+ void ImeCompositionUpdated(const base::string16& text,
const std::vector<int>& clauses,
const std::vector<int>& target,
int cursor_position);
// Informs the plugin that IME composition has completed./ If |text| is empty,
// IME was cancelled.
- void ImeCompositionCompleted(const string16& text);
+ void ImeCompositionCompleted(const base::string16& text);
// Returns the IME status retrieved from a plug-in.
bool GetIMEStatus(int* input_type, gfx::Rect* caret_rect);
@@ -186,7 +186,7 @@ class WEBKIT_PLUGINS_EXPORT WebPluginDelegateImpl : public WebPluginDelegate {
const gfx::Rect& view_frame);
// Informs the plugin that IME composition has completed.
// If |text| is empty, IME was cancelled.
- void ImeCompositionCompleted(const string16& text);
+ void ImeCompositionCompleted(const base::string16& text);
// Informs the delegate that the plugin set a Cocoa NSCursor.
void SetNSCursor(NSCursor* cursor);
diff --git a/webkit/plugins/npapi/webplugin_delegate_impl_mac.mm b/webkit/plugins/npapi/webplugin_delegate_impl_mac.mm
index e8594f8..1ecbc85 100644
--- a/webkit/plugins/npapi/webplugin_delegate_impl_mac.mm
+++ b/webkit/plugins/npapi/webplugin_delegate_impl_mac.mm
@@ -229,7 +229,8 @@ bool WebPluginDelegateImpl::PlatformInitialize() {
// that behavior here.
const WebPluginInfo& plugin_info =
instance_->plugin_lib()->plugin_info();
- if (plugin_info.name.find(ASCIIToUTF16("Flash")) != string16::npos)
+ if (plugin_info.name.find(ASCIIToUTF16("Flash")) !=
+ base::string16::npos)
gpu_preference = gfx::PreferIntegratedGpu;
surface_ = plugin_->GetAcceleratedSurface(gpu_preference);
@@ -615,7 +616,8 @@ void WebPluginDelegateImpl::WindowFrameChanged(const gfx::Rect& window_frame,
SetContentAreaOrigin(gfx::Point(view_frame.x(), view_frame.y()));
}
-void WebPluginDelegateImpl::ImeCompositionCompleted(const string16& text) {
+void WebPluginDelegateImpl::ImeCompositionCompleted(
+ const base::string16& text) {
ime_enabled_ = false;
// If |text| is empty this was just called to tell us composition was
diff --git a/webkit/plugins/npapi/webplugin_delegate_impl_win.cc b/webkit/plugins/npapi/webplugin_delegate_impl_win.cc
index 02d44ac..72abf8a 100644
--- a/webkit/plugins/npapi/webplugin_delegate_impl_win.cc
+++ b/webkit/plugins/npapi/webplugin_delegate_impl_win.cc
@@ -203,7 +203,7 @@ int GetPluginMajorVersion(const WebPluginInfo& plugin_info) {
bool GetPluginPropertyFromWindow(
HWND window, const wchar_t* plugin_atom_property,
- string16* plugin_property) {
+ base::string16* plugin_property) {
ATOM plugin_atom = reinterpret_cast<ATOM>(
GetPropW(window, plugin_atom_property));
if (plugin_atom != 0) {
@@ -220,12 +220,12 @@ bool GetPluginPropertyFromWindow(
} // namespace
bool WebPluginDelegateImpl::IsPluginDelegateWindow(HWND window) {
- return ui::GetClassName(window) == string16(kNativeWindowClassName);
+ return ui::GetClassName(window) == base::string16(kNativeWindowClassName);
}
// static
bool WebPluginDelegateImpl::GetPluginNameFromWindow(
- HWND window, string16* plugin_name) {
+ HWND window, base::string16* plugin_name) {
return IsPluginDelegateWindow(window) &&
GetPluginPropertyFromWindow(
window, kPluginNameAtomProperty, plugin_name);
@@ -233,7 +233,7 @@ bool WebPluginDelegateImpl::GetPluginNameFromWindow(
// static
bool WebPluginDelegateImpl::GetPluginVersionFromWindow(
- HWND window, string16* plugin_version) {
+ HWND window, base::string16* plugin_version) {
return IsPluginDelegateWindow(window) &&
GetPluginPropertyFromWindow(
window, kPluginVersionAtomProperty, plugin_version);
@@ -560,7 +560,7 @@ bool WebPluginDelegateImpl::WindowedCreatePlugin() {
DCHECK(result == TRUE) << "SetProp failed, last error = " <<
GetLastError();
}
- string16 plugin_version = plugin_lib->plugin_info().version;
+ base::string16 plugin_version = plugin_lib->plugin_info().version;
if (!plugin_version.empty()) {
ATOM plugin_version_atom = GlobalAddAtomW(plugin_version.c_str());
DCHECK_NE(0, plugin_version_atom);
@@ -1477,7 +1477,7 @@ LONG WINAPI WebPluginDelegateImpl::RegEnumKeyExWPatch(
}
void WebPluginDelegateImpl::ImeCompositionUpdated(
- const string16& text,
+ const base::string16& text,
const std::vector<int>& clauses,
const std::vector<int>& target,
int cursor_position) {
@@ -1488,7 +1488,8 @@ void WebPluginDelegateImpl::ImeCompositionUpdated(
plugin_ime_->SendEvents(instance());
}
-void WebPluginDelegateImpl::ImeCompositionCompleted(const string16& text) {
+void WebPluginDelegateImpl::ImeCompositionCompleted(
+ const base::string16& text) {
if (!plugin_ime_.get())
plugin_ime_.reset(new WebPluginIMEWin);
plugin_ime_->CompositionCompleted(text);
diff --git a/webkit/plugins/npapi/webplugin_ime_win.cc b/webkit/plugins/npapi/webplugin_ime_win.cc
index 10c5281..46bfaa9 100644
--- a/webkit/plugins/npapi/webplugin_ime_win.cc
+++ b/webkit/plugins/npapi/webplugin_ime_win.cc
@@ -40,7 +40,7 @@ WebPluginIMEWin::WebPluginIMEWin()
WebPluginIMEWin::~WebPluginIMEWin() {
}
-void WebPluginIMEWin::CompositionUpdated(const string16& text,
+void WebPluginIMEWin::CompositionUpdated(const base::string16& text,
std::vector<int> clauses,
std::vector<int> target,
int cursor_position) {
@@ -88,7 +88,7 @@ void WebPluginIMEWin::CompositionUpdated(const string16& text,
delta_start_ = cursor_position;
}
-void WebPluginIMEWin::CompositionCompleted(const string16& text) {
+void WebPluginIMEWin::CompositionCompleted(const base::string16& text) {
composing_text_ = false;
// We should update the following values when we finish a composition:
diff --git a/webkit/plugins/npapi/webplugin_ime_win.h b/webkit/plugins/npapi/webplugin_ime_win.h
index 123231d..0b20584 100644
--- a/webkit/plugins/npapi/webplugin_ime_win.h
+++ b/webkit/plugins/npapi/webplugin_ime_win.h
@@ -51,7 +51,7 @@ class PluginInstance;
//
// WebPluginIMEWin ime;
// ...
-// string16 text = "composing";
+// base::string16 text = "composing";
// std::vector<int> clauses;
// clauses.push_back(0);
// clauses.push_back(text.length());
@@ -59,7 +59,7 @@ class PluginInstance;
// ime.CompositionUpdated(text, clauses, target, text.length());
// ime.SendEvents(instance());
//
-// string16 result = "result";
+// base::string16 result = "result";
// ime.CompositionCompleted(result);
// ime.SendEvents(instance());
//
@@ -94,11 +94,11 @@ class WebPluginIMEWin {
// mapped to two or more Windows events and it is not so trivial to send these
// Windows events to a plug-in. This function inserts Windows events in the
// order expected by a plug-in.
- void CompositionUpdated(const string16& text,
+ void CompositionUpdated(const base::string16& text,
std::vector<int> clauses,
std::vector<int> target,
int cursor_position);
- void CompositionCompleted(const string16& text);
+ void CompositionCompleted(const base::string16& text);
// Send all the events added in Update() to a plug-in.
bool SendEvents(PluginInstance* instance);
@@ -141,10 +141,10 @@ class WebPluginIMEWin {
std::vector<NPEvent> events_;
// The return value for GCS_COMPSTR.
- string16 composition_text_;
+ base::string16 composition_text_;
// The return value for GCS_RESULTSTR.
- string16 result_text_;
+ base::string16 result_text_;
// The return value for GCS_COMPATTR.
std::string composition_attributes_;
diff --git a/webkit/plugins/npapi/webplugin_impl.cc b/webkit/plugins/npapi/webplugin_impl.cc
index 1b4615b..8894f63 100644
--- a/webkit/plugins/npapi/webplugin_impl.cc
+++ b/webkit/plugins/npapi/webplugin_impl.cc
@@ -282,7 +282,7 @@ NPObject* WebPluginImpl::scriptableObject() {
bool WebPluginImpl::getFormValue(WebKit::WebString& value) {
if (!delegate_)
return false;
- string16 form_value;
+ base::string16 form_value;
if (!delegate_->GetFormValue(&form_value))
return false;
value = form_value;
diff --git a/webkit/plugins/ppapi/event_conversion.cc b/webkit/plugins/ppapi/event_conversion.cc
index 3fac5d1..a0f9730 100644
--- a/webkit/plugins/ppapi/event_conversion.cc
+++ b/webkit/plugins/ppapi/event_conversion.cc
@@ -369,7 +369,7 @@ WebKeyboardEvent* BuildCharEvent(const InputEventData& event) {
// Make sure to not read beyond the buffer in case some bad code doesn't
// NULL-terminate it (this is called from plugins).
size_t text_length_cap = WebKeyboardEvent::textLengthCap;
- string16 text16 = UTF8ToUTF16(event.character_text);
+ base::string16 text16 = UTF8ToUTF16(event.character_text);
memset(key_event->text, 0, text_length_cap);
memset(key_event->unmodifiedText, 0, text_length_cap);
diff --git a/webkit/plugins/ppapi/mock_plugin_delegate.cc b/webkit/plugins/ppapi/mock_plugin_delegate.cc
index 137c061..07c963e 100644
--- a/webkit/plugins/ppapi/mock_plugin_delegate.cc
+++ b/webkit/plugins/ppapi/mock_plugin_delegate.cc
@@ -40,13 +40,14 @@ void MockPluginDelegate::PluginSelectionChanged(PluginInstance* instance) {
}
void MockPluginDelegate::SimulateImeSetComposition(
- const string16& text,
+ const base::string16& text,
const std::vector<WebKit::WebCompositionUnderline>& underlines,
int selection_start,
int selection_end) {
}
-void MockPluginDelegate::SimulateImeConfirmComposition(const string16& text) {
+void MockPluginDelegate::SimulateImeConfirmComposition(
+ const base::string16& text) {
}
void MockPluginDelegate::PluginCrashed(PluginInstance* instance) {
diff --git a/webkit/plugins/ppapi/mock_plugin_delegate.h b/webkit/plugins/ppapi/mock_plugin_delegate.h
index b26ad9f..4de2a6b 100644
--- a/webkit/plugins/ppapi/mock_plugin_delegate.h
+++ b/webkit/plugins/ppapi/mock_plugin_delegate.h
@@ -24,11 +24,11 @@ class MockPluginDelegate : public PluginDelegate {
virtual void PluginRequestedCancelComposition(PluginInstance* instance);
virtual void PluginSelectionChanged(PluginInstance* instance);
virtual void SimulateImeSetComposition(
- const string16& text,
+ const base::string16& text,
const std::vector<WebKit::WebCompositionUnderline>& underlines,
int selection_start,
int selection_end);
- virtual void SimulateImeConfirmComposition(const string16& text);
+ virtual void SimulateImeConfirmComposition(const base::string16& text);
virtual void PluginCrashed(PluginInstance* instance);
virtual void InstanceCreated(PluginInstance* instance);
virtual void InstanceDeleted(PluginInstance* instance);
diff --git a/webkit/plugins/ppapi/plugin_delegate.h b/webkit/plugins/ppapi/plugin_delegate.h
index 1c861e8..3a8a724 100644
--- a/webkit/plugins/ppapi/plugin_delegate.h
+++ b/webkit/plugins/ppapi/plugin_delegate.h
@@ -362,11 +362,11 @@ class PluginDelegate {
webkit::ppapi::PluginInstance* instance) = 0;
// Requests simulating IME events for testing purpose.
virtual void SimulateImeSetComposition(
- const string16& text,
+ const base::string16& text,
const std::vector<WebKit::WebCompositionUnderline>& underlines,
int selection_start,
int selection_end) = 0;
- virtual void SimulateImeConfirmComposition(const string16& text) = 0;
+ virtual void SimulateImeConfirmComposition(const base::string16& text) = 0;
// Notification that the given plugin has crashed. When a plugin crashes, all
// instances associated with that plugin will notify that they've crashed via
diff --git a/webkit/plugins/ppapi/ppapi_plugin_instance.cc b/webkit/plugins/ppapi/ppapi_plugin_instance.cc
index d85c05e..5ad3aa7 100644
--- a/webkit/plugins/ppapi/ppapi_plugin_instance.cc
+++ b/webkit/plugins/ppapi/ppapi_plugin_instance.cc
@@ -603,7 +603,7 @@ bool PluginInstance::HandleDocumentLoad(PPB_URLLoader_Impl* loader) {
}
bool PluginInstance::SendCompositionEventToPlugin(PP_InputEvent_Type type,
- const string16& text) {
+ const base::string16& text) {
std::vector<WebKit::WebCompositionUnderline> empty;
return SendCompositionEventWithUnderlineInformationToPlugin(
type, text, empty, static_cast<int>(text.size()),
@@ -612,7 +612,7 @@ bool PluginInstance::SendCompositionEventToPlugin(PP_InputEvent_Type type,
bool PluginInstance::SendCompositionEventWithUnderlineInformationToPlugin(
PP_InputEvent_Type type,
- const string16& text,
+ const base::string16& text,
const std::vector<WebKit::WebCompositionUnderline>& underlines,
int selection_start,
int selection_end) {
@@ -693,13 +693,13 @@ void PluginInstance::RequestInputEventsHelper(uint32_t event_classes) {
container_->setWantsWheelEvents(IsAcceptingWheelEvents());
}
-bool PluginInstance::HandleCompositionStart(const string16& text) {
+bool PluginInstance::HandleCompositionStart(const base::string16& text) {
return SendCompositionEventToPlugin(PP_INPUTEVENT_TYPE_IME_COMPOSITION_START,
text);
}
bool PluginInstance::HandleCompositionUpdate(
- const string16& text,
+ const base::string16& text,
const std::vector<WebKit::WebCompositionUnderline>& underlines,
int selection_start,
int selection_end) {
@@ -708,24 +708,26 @@ bool PluginInstance::HandleCompositionUpdate(
text, underlines, selection_start, selection_end);
}
-bool PluginInstance::HandleCompositionEnd(const string16& text) {
+bool PluginInstance::HandleCompositionEnd(const base::string16& text) {
return SendCompositionEventToPlugin(PP_INPUTEVENT_TYPE_IME_COMPOSITION_END,
text);
}
-bool PluginInstance::HandleTextInput(const string16& text) {
+bool PluginInstance::HandleTextInput(const base::string16& text) {
return SendCompositionEventToPlugin(PP_INPUTEVENT_TYPE_IME_TEXT,
text);
}
-void PluginInstance::GetSurroundingText(string16* text,
+void PluginInstance::GetSurroundingText(base::string16* text,
ui::Range* range) const {
std::vector<size_t> offsets;
offsets.push_back(selection_anchor_);
offsets.push_back(selection_caret_);
*text = base::UTF8ToUTF16AndAdjustOffsets(surrounding_text_, &offsets);
- range->set_start(offsets[0] == string16::npos ? text->size() : offsets[0]);
- range->set_end(offsets[1] == string16::npos ? text->size() : offsets[1]);
+ range->set_start(offsets[0] == base::string16::npos ? text->size()
+ : offsets[0]);
+ range->set_end(offsets[1] == base::string16::npos ? text->size()
+ : offsets[1]);
}
bool PluginInstance::IsPluginAcceptingCompositionEvents() const {
@@ -994,16 +996,16 @@ bool PluginInstance::GetBitmapForOptimizedPluginPaint(
return true;
}
-string16 PluginInstance::GetSelectedText(bool html) {
+base::string16 PluginInstance::GetSelectedText(bool html) {
// Keep a reference on the stack. See NOTE above.
scoped_refptr<PluginInstance> ref(this);
if (!LoadSelectionInterface())
- return string16();
+ return base::string16();
PP_Var rv = plugin_selection_interface_->GetSelectedText(pp_instance(),
PP_FromBool(html));
StringVar* string = StringVar::FromPPVar(rv);
- string16 selection;
+ base::string16 selection;
if (string)
selection = UTF8ToUTF16(string->value());
// Release the ref the plugin transfered to us.
@@ -1011,18 +1013,18 @@ string16 PluginInstance::GetSelectedText(bool html) {
return selection;
}
-string16 PluginInstance::GetLinkAtPosition(const gfx::Point& point) {
+base::string16 PluginInstance::GetLinkAtPosition(const gfx::Point& point) {
// Keep a reference on the stack. See NOTE above.
scoped_refptr<PluginInstance> ref(this);
if (!LoadPdfInterface())
- return string16();
+ return base::string16();
PP_Point p;
p.x = point.x();
p.y = point.y();
PP_Var rv = plugin_pdf_interface_->GetLinkAtPosition(pp_instance(), p);
StringVar* string = StringVar::FromPPVar(rv);
- string16 link;
+ base::string16 link;
if (string)
link = UTF8ToUTF16(string->value());
// Release the ref the plugin transfered to us.
@@ -1048,7 +1050,7 @@ void PluginInstance::Zoom(double factor, bool text_only) {
plugin_zoom_interface_->Zoom(pp_instance(), factor, PP_FromBool(text_only));
}
-bool PluginInstance::StartFind(const string16& search_text,
+bool PluginInstance::StartFind(const base::string16& search_text,
bool case_sensitive,
int identifier) {
// Keep a reference on the stack. See NOTE above.
@@ -1835,7 +1837,7 @@ void PluginInstance::SimulateImeSetCompositionEvent(
input_event.composition_segment_offsets.begin(),
input_event.composition_segment_offsets.end());
- string16 utf16_text =
+ base::string16 utf16_text =
base::UTF8ToUTF16AndAdjustOffsets(input_event.character_text, &offsets);
std::vector<WebKit::WebCompositionUnderline> underlines;
diff --git a/webkit/plugins/ppapi/ppapi_plugin_instance.h b/webkit/plugins/ppapi/ppapi_plugin_instance.h
index 0b906a6b..b6456ba 100644
--- a/webkit/plugins/ppapi/ppapi_plugin_instance.h
+++ b/webkit/plugins/ppapi/ppapi_plugin_instance.h
@@ -185,20 +185,20 @@ class WEBKIT_PLUGINS_EXPORT PluginInstance :
const std::vector<gfx::Rect>& cut_outs_rects);
// Handlers for composition events.
- bool HandleCompositionStart(const string16& text);
+ bool HandleCompositionStart(const base::string16& text);
bool HandleCompositionUpdate(
- const string16& text,
+ const base::string16& text,
const std::vector<WebKit::WebCompositionUnderline>& underlines,
int selection_start,
int selection_end);
- bool HandleCompositionEnd(const string16& text);
- bool HandleTextInput(const string16& text);
+ bool HandleCompositionEnd(const base::string16& text);
+ bool HandleTextInput(const base::string16& text);
// Gets the current text input status.
ui::TextInputType text_input_type() const { return text_input_type_; }
gfx::Rect GetCaretBounds() const;
bool IsPluginAcceptingCompositionEvents() const;
- void GetSurroundingText(string16* text, ui::Range* range) const;
+ void GetSurroundingText(base::string16* text, ui::Range* range) const;
// Notifications about focus changes, see has_webkit_focus_ below.
void SetWebKitFocus(bool has_focus);
@@ -229,11 +229,11 @@ class WEBKIT_PLUGINS_EXPORT PluginInstance :
void AddPluginObject(PluginObject* plugin_object);
void RemovePluginObject(PluginObject* plugin_object);
- string16 GetSelectedText(bool html);
- string16 GetLinkAtPosition(const gfx::Point& point);
+ base::string16 GetSelectedText(bool html);
+ base::string16 GetLinkAtPosition(const gfx::Point& point);
void RequestSurroundingText(size_t desired_number_of_characters);
void Zoom(double factor, bool text_only);
- bool StartFind(const string16& search_text,
+ bool StartFind(const base::string16& search_text,
bool case_sensitive,
int identifier);
void SelectFindResult(bool forward);
@@ -565,10 +565,10 @@ class WEBKIT_PLUGINS_EXPORT PluginInstance :
// Internal helper functions for HandleCompositionXXX().
bool SendCompositionEventToPlugin(
PP_InputEvent_Type type,
- const string16& text);
+ const base::string16& text);
bool SendCompositionEventWithUnderlineInformationToPlugin(
PP_InputEvent_Type type,
- const string16& text,
+ const base::string16& text,
const std::vector<WebKit::WebCompositionUnderline>& underlines,
int selection_start,
int selection_end);
diff --git a/webkit/plugins/webplugininfo.cc b/webkit/plugins/webplugininfo.cc
index a581647..be80fcf 100644
--- a/webkit/plugins/webplugininfo.cc
+++ b/webkit/plugins/webplugininfo.cc
@@ -50,10 +50,10 @@ WebPluginInfo& WebPluginInfo::operator=(const WebPluginInfo& rhs) {
return *this;
}
-WebPluginInfo::WebPluginInfo(const string16& fake_name,
+WebPluginInfo::WebPluginInfo(const base::string16& fake_name,
const base::FilePath& fake_path,
- const string16& fake_version,
- const string16& fake_desc)
+ const base::string16& fake_version,
+ const base::string16& fake_desc)
: name(fake_name),
path(fake_path),
version(fake_version),
diff --git a/webkit/plugins/webplugininfo.h b/webkit/plugins/webplugininfo.h
index b08e349..10ada2c 100644
--- a/webkit/plugins/webplugininfo.h
+++ b/webkit/plugins/webplugininfo.h
@@ -30,11 +30,11 @@ struct WEBKIT_PLUGINS_EXPORT WebPluginMimeType {
std::vector<std::string> file_extensions;
// Description of the mime type.
- string16 description;
+ base::string16 description;
// Extra parameters to include when instantiating the plugin.
- std::vector<string16> additional_param_names;
- std::vector<string16> additional_param_values;
+ std::vector<base::string16> additional_param_names;
+ std::vector<base::string16> additional_param_values;
};
// Describes an available NPAPI or Pepper plugin.
@@ -52,22 +52,22 @@ struct WEBKIT_PLUGINS_EXPORT WebPluginInfo {
WebPluginInfo& operator=(const WebPluginInfo& rhs);
// Special constructor only used during unit testing:
- WebPluginInfo(const string16& fake_name,
+ WebPluginInfo(const base::string16& fake_name,
const base::FilePath& fake_path,
- const string16& fake_version,
- const string16& fake_desc);
+ const base::string16& fake_version,
+ const base::string16& fake_desc);
// The name of the plugin (i.e. Flash).
- string16 name;
+ base::string16 name;
// The path to the plugin file (DLL/bundle/library).
base::FilePath path;
// The version number of the plugin file (may be OS-specific)
- string16 version;
+ base::string16 version;
// A description of the plugin that we get from its version info.
- string16 desc;
+ base::string16 desc;
// A list of all the mime types that this plugin supports.
std::vector<WebPluginMimeType> mime_types;