summaryrefslogtreecommitdiffstats
path: root/ui/base/win
diff options
context:
space:
mode:
authordbeam@chromium.org <dbeam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-18 20:03:44 +0000
committerdbeam@chromium.org <dbeam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-18 20:03:44 +0000
commit2aadf21d2ff4882cb94510e4107067a70a928850 (patch)
tree8acbc4f186e6fc73a20292b2baca8efc954d47cb /ui/base/win
parentdf97969962d83bf8ad962bc3d46b824ebeee4af0 (diff)
downloadchromium_src-2aadf21d2ff4882cb94510e4107067a70a928850.zip
chromium_src-2aadf21d2ff4882cb94510e4107067a70a928850.tar.gz
chromium_src-2aadf21d2ff4882cb94510e4107067a70a928850.tar.bz2
Prefix string16 with base:: in ui/.
R=sky@chromium.org, tsepez@chromium.org BUG=329295 Review URL: https://codereview.chromium.org/117983002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@241625 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/base/win')
-rw-r--r--ui/base/win/message_box_win.cc8
-rw-r--r--ui/base/win/message_box_win.h4
-rw-r--r--ui/base/win/shell.cc44
-rw-r--r--ui/base/win/shell.h30
4 files changed, 48 insertions, 38 deletions
diff --git a/ui/base/win/message_box_win.cc b/ui/base/win/message_box_win.cc
index c78e98b..6500f98 100644
--- a/ui/base/win/message_box_win.cc
+++ b/ui/base/win/message_box_win.cc
@@ -14,8 +14,8 @@ namespace ui {
// RTL locale, we need to make sure that LTR strings are rendered correctly by
// adding the appropriate Unicode directionality marks.
int MessageBox(HWND hwnd,
- const string16& text,
- const string16& caption,
+ const base::string16& text,
+ const base::string16& caption,
UINT flags) {
if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kNoMessageBox))
return IDOK;
@@ -24,11 +24,11 @@ int MessageBox(HWND hwnd,
if (base::i18n::IsRTL())
actual_flags |= MB_RIGHT | MB_RTLREADING;
- string16 localized_text = text;
+ base::string16 localized_text = text;
base::i18n::AdjustStringForLocaleDirection(&localized_text);
const wchar_t* text_ptr = localized_text.c_str();
- string16 localized_caption = caption;
+ base::string16 localized_caption = caption;
base::i18n::AdjustStringForLocaleDirection(&localized_caption);
const wchar_t* caption_ptr = localized_caption.c_str();
diff --git a/ui/base/win/message_box_win.h b/ui/base/win/message_box_win.h
index a91c00f7..f24150e 100644
--- a/ui/base/win/message_box_win.h
+++ b/ui/base/win/message_box_win.h
@@ -17,8 +17,8 @@ namespace ui {
// callers don't have to worry about adding these flags when running in a
// right-to-left locale.
UI_EXPORT int MessageBox(HWND hwnd,
- const string16& text,
- const string16& caption,
+ const base::string16& text,
+ const base::string16& caption,
UINT flags);
} // namespace ui
diff --git a/ui/base/win/shell.cc b/ui/base/win/shell.cc
index ff1a4ff..7866e71 100644
--- a/ui/base/win/shell.cc
+++ b/ui/base/win/shell.cc
@@ -24,7 +24,7 @@ namespace win {
// Show the Windows "Open With" dialog box to ask the user to pick an app to
// open the file with.
-bool OpenItemWithExternalApp(const string16& full_path) {
+bool OpenItemWithExternalApp(const base::string16& full_path) {
SHELLEXECUTEINFO sei = { sizeof(sei) };
sei.fMask = SEE_MASK_FLAG_DDEWAIT;
sei.nShow = SW_SHOWNORMAL;
@@ -33,9 +33,9 @@ bool OpenItemWithExternalApp(const string16& full_path) {
return (TRUE == ::ShellExecuteExW(&sei));
}
-bool OpenAnyViaShell(const string16& full_path,
- const string16& directory,
- const string16& args,
+bool OpenAnyViaShell(const base::string16& full_path,
+ const base::string16& directory,
+ const base::string16& args,
DWORD mask) {
SHELLEXECUTEINFO sei = { sizeof(sei) };
sei.fMask = mask;
@@ -54,11 +54,11 @@ bool OpenAnyViaShell(const string16& full_path,
bool OpenItemViaShell(const base::FilePath& full_path) {
return OpenAnyViaShell(full_path.value(), full_path.DirName().value(),
- string16(), 0);
+ base::string16(), 0);
}
bool OpenItemViaShellNoZoneCheck(const base::FilePath& full_path) {
- return OpenAnyViaShell(full_path.value(), string16(), string16(),
+ return OpenAnyViaShell(full_path.value(), base::string16(), base::string16(),
SEE_MASK_NOZONECHECKS | SEE_MASK_FLAG_DDEWAIT);
}
@@ -80,10 +80,10 @@ bool PreventWindowFromPinning(HWND hwnd) {
// TODO(calamity): investigate moving this out of the UI thread as COM
// operations may spawn nested message loops which can cause issues.
-void SetAppDetailsForWindow(const string16& app_id,
- const string16& app_icon,
- const string16& relaunch_command,
- const string16& relaunch_display_name,
+void SetAppDetailsForWindow(const base::string16& app_id,
+ const base::string16& app_icon,
+ const base::string16& relaunch_command,
+ const base::string16& relaunch_display_name,
HWND hwnd) {
// This functionality is only available on Win7+. It also doesn't make sense
// to do this for Chrome Metro.
@@ -112,19 +112,27 @@ void SetAppDetailsForWindow(const string16& app_id,
}
}
-void SetAppIdForWindow(const string16& app_id, HWND hwnd) {
- SetAppDetailsForWindow(app_id, string16(), string16(), string16(), hwnd);
+void SetAppIdForWindow(const base::string16& app_id, HWND hwnd) {
+ SetAppDetailsForWindow(app_id,
+ base::string16(),
+ base::string16(),
+ base::string16(),
+ hwnd);
}
-void SetAppIconForWindow(const string16& app_icon, HWND hwnd) {
- SetAppDetailsForWindow(string16(), app_icon, string16(), string16(), hwnd);
+void SetAppIconForWindow(const base::string16& app_icon, HWND hwnd) {
+ SetAppDetailsForWindow(base::string16(),
+ app_icon,
+ base::string16(),
+ base::string16(),
+ hwnd);
}
-void SetRelaunchDetailsForWindow(const string16& relaunch_command,
- const string16& display_name,
+void SetRelaunchDetailsForWindow(const base::string16& relaunch_command,
+ const base::string16& display_name,
HWND hwnd) {
- SetAppDetailsForWindow(string16(),
- string16(),
+ SetAppDetailsForWindow(base::string16(),
+ base::string16(),
relaunch_command,
display_name,
hwnd);
diff --git a/ui/base/win/shell.h b/ui/base/win/shell.h
index e85d2b4..82f828f 100644
--- a/ui/base/win/shell.h
+++ b/ui/base/win/shell.h
@@ -32,15 +32,15 @@ UI_EXPORT bool OpenItemViaShellNoZoneCheck(const base::FilePath& full_path);
// don't use it if one of the above will do. |mask| is a valid combination
// of SEE_MASK_FLAG_XXX as stated in msdn. If there is no default application
// registered for the item, it behaves the same as OpenItemViaShell.
-UI_EXPORT bool OpenAnyViaShell(const string16& full_path,
- const string16& directory,
- const string16& args,
+UI_EXPORT bool OpenAnyViaShell(const base::string16& full_path,
+ const base::string16& directory,
+ const base::string16& args,
DWORD mask);
// Ask the user, via the Windows "Open With" dialog, for an application to use
// to open the file specified by 'full_path'.
// Returns 'true' on successful open, 'false' otherwise.
-bool OpenItemWithExternalApp(const string16& full_path);
+bool OpenItemWithExternalApp(const base::string16& full_path);
// Disables the ability of the specified window to be pinned to the taskbar or
// the Start menu. This will remove "Pin this program to taskbar" from the
@@ -49,26 +49,28 @@ UI_EXPORT bool PreventWindowFromPinning(HWND hwnd);
// Sets the application id, app icon, relaunch command and relaunch display name
// for the given window.
-UI_EXPORT void SetAppDetailsForWindow(const string16& app_id,
- const string16& app_icon,
- const string16& relaunch_command,
- const string16& relaunch_display_name,
- HWND hwnd);
+UI_EXPORT void SetAppDetailsForWindow(
+ const base::string16& app_id,
+ const base::string16& app_icon,
+ const base::string16& relaunch_command,
+ const base::string16& relaunch_display_name,
+ HWND hwnd);
// Sets the application id given as the Application Model ID for the window
// specified. This method is used to insure that different web applications
// do not group together on the Win7 task bar.
-UI_EXPORT void SetAppIdForWindow(const string16& app_id, HWND hwnd);
+UI_EXPORT void SetAppIdForWindow(const base::string16& app_id, HWND hwnd);
// Sets the application icon for the window specified.
-UI_EXPORT void SetAppIconForWindow(const string16& app_icon, HWND hwnd);
+UI_EXPORT void SetAppIconForWindow(const base::string16& app_icon, HWND hwnd);
// Sets the relaunch command and relaunch display name for the window specified.
// Windows will use this information for grouping on the taskbar, and to create
// a shortcut if the window is pinned to the taskbar.
-UI_EXPORT void SetRelaunchDetailsForWindow(const string16& relaunch_command,
- const string16& display_name,
- HWND hwnd);
+UI_EXPORT void SetRelaunchDetailsForWindow(
+ const base::string16& relaunch_command,
+ const base::string16& display_name,
+ HWND hwnd);
// Returns true if composition is available and turned on on the current
// platform.