Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(83)

Unified Diff: ui/views/controls/menu/native_menu_win.cc

Issue 117983002: Prefix string16 with base:: in ui/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/views/controls/menu/native_menu_win.h ('k') | ui/views/controls/message_box_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/menu/native_menu_win.cc
diff --git a/ui/views/controls/menu/native_menu_win.cc b/ui/views/controls/menu/native_menu_win.cc
index c260af9bcce4a1dd1cf7ad95b60cdb68c066375f..2a6e8b83a716332cf2ff9066abd835159ffd988e 100644
--- a/ui/views/controls/menu/native_menu_win.cc
+++ b/ui/views/controls/menu/native_menu_win.cc
@@ -51,7 +51,7 @@ struct NativeMenuWin::ItemData {
// The Windows API requires that whoever creates the menus must own the
// strings used for labels, and keep them around for the lifetime of the
// created menu. So be it.
- string16 label;
+ base::string16 label;
// Someone needs to own submenus, it may as well be us.
scoped_ptr<Menu2> submenu;
@@ -178,7 +178,7 @@ class NativeMenuWin::MenuHostWindow {
if (data->submenu.get())
measure_item_struct->itemWidth += kArrowWidth;
// If the label contains an accelerator, make room for tab.
- if (data->label.find(L'\t') != string16::npos)
+ if (data->label.find(L'\t') != base::string16::npos)
measure_item_struct->itemWidth += font.GetStringWidth(L" ");
measure_item_struct->itemHeight =
font.GetHeight() + kItemBottomMargin + kItemTopMargin;
@@ -234,10 +234,10 @@ class NativeMenuWin::MenuHostWindow {
// left and the accelerator on the right.
// TODO(jungshik): This will break in RTL UI. Currently, he/ar use the
// window system UI font and will not hit here.
- string16 label = data->label;
- string16 accel;
- string16::size_type tab_pos = label.find(L'\t');
- if (tab_pos != string16::npos) {
+ base::string16 label = data->label;
+ base::string16 accel;
+ base::string16::size_type tab_pos = label.find(L'\t');
+ if (tab_pos != base::string16::npos) {
accel = label.substr(tab_pos);
label = label.substr(0, tab_pos);
}
@@ -626,7 +626,7 @@ void NativeMenuWin::AddMenuItemAt(int menu_index, int model_index) {
mii.fType = MFT_OWNERDRAW;
ItemData* item_data = new ItemData;
- item_data->label = string16();
+ item_data->label = base::string16();
ui::MenuModel::ItemType type = model_->GetTypeAt(model_index);
if (type == ui::MenuModel::TYPE_SUBMENU) {
item_data->submenu.reset(new Menu2(model_->GetSubmenuModelAt(model_index)));
@@ -678,7 +678,7 @@ void NativeMenuWin::SetMenuItemState(int menu_index, bool enabled, bool checked,
void NativeMenuWin::SetMenuItemLabel(int menu_index,
int model_index,
- const string16& label) {
+ const base::string16& label) {
if (IsSeparatorItemAt(menu_index))
return;
@@ -690,8 +690,8 @@ void NativeMenuWin::SetMenuItemLabel(int menu_index,
void NativeMenuWin::UpdateMenuItemInfoForString(MENUITEMINFO* mii,
int model_index,
- const string16& label) {
- string16 formatted = label;
+ const base::string16& label) {
+ base::string16 formatted = label;
ui::MenuModel::ItemType type = model_->GetTypeAt(model_index);
// Strip out any tabs, otherwise they get interpreted as accelerators and can
// lead to weird behavior.
« no previous file with comments | « ui/views/controls/menu/native_menu_win.h ('k') | ui/views/controls/message_box_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698