diff options
Diffstat (limited to 'chrome/browser/ui/views')
9 files changed, 36 insertions, 33 deletions
diff --git a/chrome/browser/ui/views/about_ipc_dialog.cc b/chrome/browser/ui/views/about_ipc_dialog.cc index cd87c0c..b763948 100644 --- a/chrome/browser/ui/views/about_ipc_dialog.cc +++ b/chrome/browser/ui/views/about_ipc_dialog.cc @@ -96,7 +96,7 @@ void InitDialog(HWND hwnd) { (*i->second)(&name, NULL, NULL); if (name.empty()) continue; // Will happen if the message file isn't included above. - std::wstring wname = UTF8ToWide(name); + std::wstring wname = base::UTF8ToWide(name); int index = messages->InsertItem( LVIF_TEXT | LVIF_PARAM, 0, wname.c_str(), 0, 0, 0, i->first); @@ -304,14 +304,14 @@ void AboutIPCDialog::Log(const IPC::LogData& data) { message_list_.SetItemText(index, kTimeColumn, sent_str.c_str()); message_list_.SetItemText(index, kChannelColumn, - ASCIIToWide(data.channel).c_str()); + base::ASCIIToWide(data.channel).c_str()); std::string message_name; IPC::Logging::GetMessageText(data.type, &message_name, NULL, NULL); message_list_.SetItemText(index, kMessageColumn, - UTF8ToWide(message_name).c_str()); + base::UTF8ToWide(message_name).c_str()); message_list_.SetItemText(index, kFlagsColumn, - UTF8ToWide(data.flags).c_str()); + base::UTF8ToWide(data.flags).c_str()); int64 time_to_send = (base::Time::FromInternalValue(data.receive) - sent).InMilliseconds(); @@ -327,7 +327,7 @@ void AboutIPCDialog::Log(const IPC::LogData& data) { message_list_.SetItemText(index, kProcessColumn, temp.c_str()); message_list_.SetItemText(index, kParamsColumn, - UTF8ToWide(data.params).c_str()); + base::UTF8ToWide(data.params).c_str()); message_list_.EnsureVisible(index, FALSE); } diff --git a/chrome/browser/ui/views/accessibility/browser_views_accessibility_browsertest.cc b/chrome/browser/ui/views/accessibility/browser_views_accessibility_browsertest.cc index 319cd91..42438ec 100644 --- a/chrome/browser/ui/views/accessibility/browser_views_accessibility_browsertest.cc +++ b/chrome/browser/ui/views/accessibility/browser_views_accessibility_browsertest.cc @@ -134,7 +134,7 @@ IN_PROC_BROWSER_TEST_F(BrowserViewsAccessibilityTest, ASSERT_TRUE(NULL != acc_obj); ui_test_utils::NavigateToURL(browser(), GURL(chrome::kAboutBlankURL)); - std::wstring title = UTF16ToWide(l10n_util::GetStringFUTF16( + std::wstring title = base::UTF16ToWide(l10n_util::GetStringFUTF16( IDS_BROWSER_WINDOW_TITLE_FORMAT, ASCIIToUTF16(chrome::kAboutBlankURL))); TestAccessibilityInfo(acc_obj, title, ROLE_SYSTEM_WINDOW); @@ -149,7 +149,7 @@ IN_PROC_BROWSER_TEST_F(BrowserViewsAccessibilityTest, GetBrowserView()->GetWidget()->non_client_view(); TestViewAccessibilityObject(non_client_view, - UTF16ToWide(l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)), + base::UTF16ToWide(l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)), ROLE_SYSTEM_WINDOW); } @@ -162,7 +162,7 @@ IN_PROC_BROWSER_TEST_F(BrowserViewsAccessibilityTest, TestViewAccessibilityObject( browser_root_view, - UTF16ToWide(l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)), + base::UTF16ToWide(l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)), ROLE_SYSTEM_APPLICATION); } @@ -173,7 +173,7 @@ IN_PROC_BROWSER_TEST_F(BrowserViewsAccessibilityTest, // Verify root view MSAA name and role. TestViewAccessibilityObject( GetBrowserView(), - UTF16ToWide(l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)), + base::UTF16ToWide(l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)), ROLE_SYSTEM_CLIENT); } @@ -184,7 +184,7 @@ IN_PROC_BROWSER_TEST_F(BrowserViewsAccessibilityTest, // Verify toolbar MSAA name and role. TestViewAccessibilityObject( GetToolbarView(), - UTF16ToWide(l10n_util::GetStringUTF16(IDS_ACCNAME_TOOLBAR)), + base::UTF16ToWide(l10n_util::GetStringUTF16(IDS_ACCNAME_TOOLBAR)), ROLE_SYSTEM_TOOLBAR); } @@ -195,7 +195,7 @@ IN_PROC_BROWSER_TEST_F(BrowserViewsAccessibilityTest, // Verify Back button MSAA name and role. TestViewAccessibilityObject( GetToolbarView()->GetViewByID(VIEW_ID_BACK_BUTTON), - UTF16ToWide(l10n_util::GetStringUTF16(IDS_ACCNAME_BACK)), + base::UTF16ToWide(l10n_util::GetStringUTF16(IDS_ACCNAME_BACK)), ROLE_SYSTEM_BUTTONDROPDOWN); } @@ -207,7 +207,7 @@ IN_PROC_BROWSER_TEST_F(BrowserViewsAccessibilityTest, // Verify Forward button MSAA name and role. TestViewAccessibilityObject( GetToolbarView()->GetViewByID(VIEW_ID_FORWARD_BUTTON), - UTF16ToWide(l10n_util::GetStringUTF16(IDS_ACCNAME_FORWARD)), + base::UTF16ToWide(l10n_util::GetStringUTF16(IDS_ACCNAME_FORWARD)), ROLE_SYSTEM_BUTTONDROPDOWN); } @@ -219,7 +219,7 @@ IN_PROC_BROWSER_TEST_F(BrowserViewsAccessibilityTest, // Verify Reload button MSAA name and role. TestViewAccessibilityObject( GetToolbarView()->GetViewByID(VIEW_ID_RELOAD_BUTTON), - UTF16ToWide(l10n_util::GetStringUTF16(IDS_ACCNAME_RELOAD)), + base::UTF16ToWide(l10n_util::GetStringUTF16(IDS_ACCNAME_RELOAD)), ROLE_SYSTEM_PUSHBUTTON); } @@ -230,7 +230,7 @@ IN_PROC_BROWSER_TEST_F(BrowserViewsAccessibilityTest, // Verify Home button MSAA name and role. TestViewAccessibilityObject( GetToolbarView()->GetViewByID(VIEW_ID_HOME_BUTTON), - UTF16ToWide(l10n_util::GetStringUTF16(IDS_ACCNAME_HOME)), + base::UTF16ToWide(l10n_util::GetStringUTF16(IDS_ACCNAME_HOME)), ROLE_SYSTEM_PUSHBUTTON); } @@ -241,7 +241,7 @@ IN_PROC_BROWSER_TEST_F(BrowserViewsAccessibilityTest, // Verify Star button MSAA name and role. TestViewAccessibilityObject( GetToolbarView()->GetViewByID(VIEW_ID_STAR_BUTTON), - UTF16ToWide(l10n_util::GetStringUTF16(IDS_ACCNAME_STAR)), + base::UTF16ToWide(l10n_util::GetStringUTF16(IDS_ACCNAME_STAR)), ROLE_SYSTEM_PUSHBUTTON); } @@ -253,7 +253,7 @@ IN_PROC_BROWSER_TEST_F(BrowserViewsAccessibilityTest, // Verify App menu button MSAA name and role. TestViewAccessibilityObject( GetToolbarView()->GetViewByID(VIEW_ID_APP_MENU), - UTF16ToWide(l10n_util::GetStringUTF16(IDS_ACCNAME_APP)), + base::UTF16ToWide(l10n_util::GetStringUTF16(IDS_ACCNAME_APP)), ROLE_SYSTEM_BUTTONMENU); } @@ -262,6 +262,6 @@ IN_PROC_BROWSER_TEST_F(BrowserViewsAccessibilityTest, DISABLED_TestBookmarkBarViewAccObj) { TestViewAccessibilityObject( GetBookmarkBarView(), - UTF16ToWide(l10n_util::GetStringUTF16(IDS_ACCNAME_BOOKMARKS)), + base::UTF16ToWide(l10n_util::GetStringUTF16(IDS_ACCNAME_BOOKMARKS)), ROLE_SYSTEM_TOOLBAR); } diff --git a/chrome/browser/ui/views/bookmarks/bookmark_editor_view_unittest.cc b/chrome/browser/ui/views/bookmarks/bookmark_editor_view_unittest.cc index 91de108..92eb620 100644 --- a/chrome/browser/ui/views/bookmarks/bookmark_editor_view_unittest.cc +++ b/chrome/browser/ui/views/bookmarks/bookmark_editor_view_unittest.cc @@ -185,7 +185,7 @@ TEST_F(BookmarkEditorViewTest, EditURLKeepsPosition) { BookmarkEditor::EditDetails::EditNode(GetNode("a")), BookmarkEditorView::SHOW_TREE); - SetURLText(UTF8ToWide(GURL(base_path() + "new_a").spec())); + SetURLText(base::UTF8ToWide(GURL(base_path() + "new_a").spec())); ApplyEdits(editor_tree_model()->GetRoot()->GetChild(0)); @@ -219,7 +219,7 @@ TEST_F(BookmarkEditorViewTest, ChangeParentAndURL) { BookmarkEditor::EditDetails::EditNode(GetNode("a")), BookmarkEditorView::SHOW_TREE); - SetURLText(UTF8ToWide(GURL(base_path() + "new_a").spec())); + SetURLText(base::UTF8ToWide(GURL(base_path() + "new_a").spec())); ApplyEdits(editor_tree_model()->GetRoot()->GetChild(1)); @@ -274,7 +274,7 @@ TEST_F(BookmarkEditorViewTest, NewURL) { bb_node, 1, GURL(), string16()), BookmarkEditorView::SHOW_TREE); - SetURLText(UTF8ToWide(GURL(base_path() + "a").spec())); + SetURLText(base::UTF8ToWide(GURL(base_path() + "a").spec())); SetTitleText(L"new_a"); ApplyEdits(editor_tree_model()->GetRoot()->GetChild(0)); @@ -294,7 +294,7 @@ TEST_F(BookmarkEditorViewTest, ChangeURLNoTree) { model_->other_node()->GetChild(0)), BookmarkEditorView::NO_TREE); - SetURLText(UTF8ToWide(GURL(base_path() + "a").spec())); + SetURLText(base::UTF8ToWide(GURL(base_path() + "a").spec())); SetTitleText(L"new_a"); ApplyEdits(NULL); diff --git a/chrome/browser/ui/views/extensions/native_app_window_views.cc b/chrome/browser/ui/views/extensions/native_app_window_views.cc index e03fb9b..8c4eb5f 100644 --- a/chrome/browser/ui/views/extensions/native_app_window_views.cc +++ b/chrome/browser/ui/views/extensions/native_app_window_views.cc @@ -142,7 +142,7 @@ void NativeAppWindowViews::InitializeDefaultWindow( extension()->id()); ui::win::SetAppIdForWindow( ShellIntegration::GetAppModelIdForProfile( - UTF8ToWide(app_name), shell_window_->profile()->GetPath()), + base::UTF8ToWide(app_name), shell_window_->profile()->GetPath()), GetWidget()->GetTopLevelWidget()->GetNativeWindow()); #endif } diff --git a/chrome/browser/ui/views/external_protocol_dialog.cc b/chrome/browser/ui/views/external_protocol_dialog.cc index 2112377..af59761 100644 --- a/chrome/browser/ui/views/external_protocol_dialog.cc +++ b/chrome/browser/ui/views/external_protocol_dialog.cc @@ -134,7 +134,8 @@ ExternalProtocolDialog::ExternalProtocolDialog(WebContents* web_contents, string16 elided_command; ui::ElideString(ASCIIToUTF16(url.possibly_invalid_spec()), kMaxUrlWithoutSchemeSize, &elided_url_without_scheme); - ui::ElideString(WideToUTF16Hack(command), kMaxCommandSize, &elided_command); + ui::ElideString(base::WideToUTF16Hack(command), kMaxCommandSize, + &elided_command); string16 message_text = l10n_util::GetStringFUTF16( IDS_EXTERNAL_PROTOCOL_INFORMATION, @@ -171,9 +172,9 @@ std::wstring ExternalProtocolDialog::GetApplicationForProtocol( // to disk. http://crbug.com/61996 base::ThreadRestrictions::ScopedAllowIO allow_io; - std::wstring url_spec = ASCIIToWide(url.possibly_invalid_spec()); + std::wstring url_spec = base::ASCIIToWide(url.possibly_invalid_spec()); std::wstring cmd_key_path = - ASCIIToWide(url.scheme() + "\\shell\\open\\command"); + base::ASCIIToWide(url.scheme() + "\\shell\\open\\command"); base::win::RegKey cmd_key(HKEY_CLASSES_ROOT, cmd_key_path.c_str(), KEY_READ); size_t split_offset = url_spec.find(L':'); if (split_offset == std::wstring::npos) diff --git a/chrome/browser/ui/views/external_tab_container_win.cc b/chrome/browser/ui/views/external_tab_container_win.cc index 6bb6ece..0325a33d 100644 --- a/chrome/browser/ui/views/external_tab_container_win.cc +++ b/chrome/browser/ui/views/external_tab_container_win.cc @@ -552,7 +552,7 @@ void ExternalTabContainerWin::AddNewContents(WebContents* source, attach_params_.dimensions = initial_pos; attach_params_.user_gesture = user_gesture; attach_params_.disposition = disposition; - attach_params_.profile_name = WideToUTF8( + attach_params_.profile_name = base::WideToUTF8( profile->GetPath().DirName().BaseName().value()); automation_->Send(new AutomationMsg_AttachExternalTab( tab_handle_, attach_params_)); @@ -1020,9 +1020,9 @@ bool ExternalTabContainerWin::InitNavigationInfo( web_contents_->GetController().GetCurrentEntryIndex(); nav_info->url = entry->GetURL(); nav_info->referrer = entry->GetReferrer().url; - nav_info->title = UTF16ToWideHack(entry->GetTitle()); + nav_info->title = base::UTF16ToWideHack(entry->GetTitle()); if (nav_info->title.empty()) - nav_info->title = UTF8ToWide(nav_info->url.spec()); + nav_info->title = base::UTF8ToWide(nav_info->url.spec()); nav_info->security_style = entry->GetSSL().security_style; int content_status = entry->GetSSL().content_status; diff --git a/chrome/browser/ui/views/frame/browser_frame_win.cc b/chrome/browser/ui/views/frame/browser_frame_win.cc index ada6b651..88761af 100644 --- a/chrome/browser/ui/views/frame/browser_frame_win.cc +++ b/chrome/browser/ui/views/frame/browser_frame_win.cc @@ -518,7 +518,7 @@ void BrowserFrameWin::GetMetroCurrentTabInfo(WPARAM w_param) { DCHECK(current_tab); current_tab_info->url = base::win::LocalAllocAndCopyString( - UTF8ToWide(current_tab->GetURL().spec())); + base::UTF8ToWide(current_tab->GetURL().spec())); } //////////////////////////////////////////////////////////////////////////////// diff --git a/chrome/browser/ui/views/panels/panel_stack_view.cc b/chrome/browser/ui/views/panels/panel_stack_view.cc index 4bc5367..305ce12 100644 --- a/chrome/browser/ui/views/panels/panel_stack_view.cc +++ b/chrome/browser/ui/views/panels/panel_stack_view.cc @@ -70,8 +70,9 @@ void PanelStackView::EnsureInitialized() { #if defined(OS_WIN) ui::win::SetAppIdForWindow( - ShellIntegration::GetAppModelIdForProfile(UTF8ToWide(panel->app_name()), - panel->profile()->GetPath()), + ShellIntegration::GetAppModelIdForProfile( + base::UTF8ToWide(panel->app_name()), + panel->profile()->GetPath()), chrome::HWNDForWidget(window_)); #endif } diff --git a/chrome/browser/ui/views/panels/panel_view.cc b/chrome/browser/ui/views/panels/panel_view.cc index 802e93a..6cca503 100644 --- a/chrome/browser/ui/views/panels/panel_view.cc +++ b/chrome/browser/ui/views/panels/panel_view.cc @@ -273,8 +273,9 @@ PanelView::PanelView(Panel* panel, const gfx::Rect& bounds) #if defined(OS_WIN) ui::win::SetAppIdForWindow( - ShellIntegration::GetAppModelIdForProfile(UTF8ToWide(panel->app_name()), - panel->profile()->GetPath()), + ShellIntegration::GetAppModelIdForProfile( + base::UTF8ToWide(panel->app_name()), + panel->profile()->GetPath()), chrome::HWNDForWidget(window_)); #endif } |