summaryrefslogtreecommitdiffstats
path: root/chrome/browser/ui
diff options
context:
space:
mode:
authorxhwang@chromium.org <xhwang@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-08 22:02:11 +0000
committerxhwang@chromium.org <xhwang@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-08 22:02:11 +0000
commit3264d16a00887b248d4828dbf136b3d8db8381a6 (patch)
treef15695d5ddeba58bec42e03c84a64ed0b33392a2 /chrome/browser/ui
parent14bd554b95adc002247427614aeb70c213132282 (diff)
downloadchromium_src-3264d16a00887b248d4828dbf136b3d8db8381a6.zip
chromium_src-3264d16a00887b248d4828dbf136b3d8db8381a6.tar.gz
chromium_src-3264d16a00887b248d4828dbf136b3d8db8381a6.tar.bz2
chrome: Use base::MessageLoop. (Part 2)
This CL updates chrome/browser/ui/* BUG=236029 Review URL: https://chromiumcodereview.appspot.com/14307023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@199024 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ui')
-rw-r--r--chrome/browser/ui/app_list/app_list_controller_browsertest.cc2
-rw-r--r--chrome/browser/ui/ash/chrome_shell_delegate.cc2
-rw-r--r--chrome/browser/ui/ash/launcher/chrome_launcher_controller_per_browser_unittest.cc2
-rw-r--r--chrome/browser/ui/ash/window_positioner_unittest.cc2
-rw-r--r--chrome/browser/ui/auto_login_infobar_delegate.cc6
-rw-r--r--chrome/browser/ui/autofill/autofill_dialog_controller_unittest.cc2
-rw-r--r--chrome/browser/ui/bookmarks/bookmark_context_menu_controller_unittest.cc2
-rw-r--r--chrome/browser/ui/browser.cc4
-rw-r--r--chrome/browser/ui/browser_browsertest.cc9
-rw-r--r--chrome/browser/ui/browser_focus_uitest.cc25
-rw-r--r--chrome/browser/ui/browser_tab_strip_model_delegate.cc2
-rw-r--r--chrome/browser/ui/chrome_select_file_policy_unittest.cc2
-rw-r--r--chrome/browser/ui/cocoa/about_ipc_controller_unittest.mm8
-rw-r--r--chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_hover_state_unittest.mm6
-rw-r--r--chrome/browser/ui/cocoa/bookmarks/bookmark_drag_drop_cocoa.mm6
-rw-r--r--chrome/browser/ui/cocoa/browser_window_cocoa.mm2
-rw-r--r--chrome/browser/ui/cocoa/cocoa_profile_test.h2
-rw-r--r--chrome/browser/ui/cocoa/content_settings/collected_cookies_mac.mm2
-rw-r--r--chrome/browser/ui/cocoa/extensions/extension_install_dialog_controller.mm2
-rw-r--r--chrome/browser/ui/cocoa/external_protocol_dialog.mm2
-rw-r--r--chrome/browser/ui/cocoa/first_run_dialog.mm6
-rw-r--r--chrome/browser/ui/cocoa/importer/import_lock_dialog_cocoa.mm2
-rw-r--r--chrome/browser/ui/cocoa/keystone_infobar_delegate.mm2
-rw-r--r--chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm2
-rw-r--r--chrome/browser/ui/cocoa/location_bar/zoom_decoration_browsertest.mm5
-rw-r--r--chrome/browser/ui/cocoa/menu_controller_unittest.mm2
-rw-r--r--chrome/browser/ui/cocoa/notifications/balloon_controller_unittest.mm8
-rw-r--r--chrome/browser/ui/cocoa/one_click_signin_dialog_controller.mm2
-rw-r--r--chrome/browser/ui/cocoa/panels/display_settings_provider_cocoa.mm2
-rw-r--r--chrome/browser/ui/cocoa/status_bubble_mac.mm4
-rw-r--r--chrome/browser/ui/cocoa/status_bubble_mac_unittest.mm2
-rw-r--r--chrome/browser/ui/cocoa/tab_contents/render_view_context_menu_mac.mm3
-rw-r--r--chrome/browser/ui/cocoa/tabs/tab_audio_indicator_view_mac_unittest.mm2
-rw-r--r--chrome/browser/ui/cocoa/tabs/tab_projecting_image_view_unittest.mm2
-rw-r--r--chrome/browser/ui/cocoa/tabs/throbbing_image_view_unittest.mm2
-rw-r--r--chrome/browser/ui/cocoa/toolbar/wrench_toolbar_button_cell_unittest.mm2
-rw-r--r--chrome/browser/ui/content_settings/content_setting_bubble_model_unittest.cc3
-rw-r--r--chrome/browser/ui/extensions/app_metro_infobar_delegate_win.cc5
-rw-r--r--chrome/browser/ui/find_bar/find_bar_host_browsertest.cc8
-rw-r--r--chrome/browser/ui/fullscreen/fullscreen_controller.cc6
-rw-r--r--chrome/browser/ui/gtk/avatar_menu_bubble_gtk.cc2
-rw-r--r--chrome/browser/ui/gtk/back_forward_button_gtk.cc2
-rw-r--r--chrome/browser/ui/gtk/bookmarks/bookmark_bar_gtk.cc2
-rw-r--r--chrome/browser/ui/gtk/bookmarks/bookmark_bar_gtk_interactive_uitest.cc4
-rw-r--r--chrome/browser/ui/gtk/bookmarks/bookmark_bar_gtk_unittest.cc2
-rw-r--r--chrome/browser/ui/gtk/bookmarks/bookmark_bubble_gtk.cc2
-rw-r--r--chrome/browser/ui/gtk/bookmarks/bookmark_editor_gtk.cc2
-rw-r--r--chrome/browser/ui/gtk/bookmarks/bookmark_editor_gtk_unittest.cc2
-rw-r--r--chrome/browser/ui/gtk/browser_actions_toolbar_gtk.cc2
-rw-r--r--chrome/browser/ui/gtk/browser_window_gtk.cc2
-rw-r--r--chrome/browser/ui/gtk/chrome_to_mobile_bubble_gtk.cc6
-rw-r--r--chrome/browser/ui/gtk/download/download_item_gtk.cc2
-rw-r--r--chrome/browser/ui/gtk/download/download_shelf_gtk.cc10
-rw-r--r--chrome/browser/ui/gtk/download/download_shelf_gtk.h2
-rw-r--r--chrome/browser/ui/gtk/download/download_started_animation_gtk.cc2
-rw-r--r--chrome/browser/ui/gtk/edit_search_engine_dialog.cc2
-rw-r--r--chrome/browser/ui/gtk/extensions/bundle_installed_bubble_gtk.cc5
-rw-r--r--chrome/browser/ui/gtk/extensions/extension_installed_bubble_gtk.cc4
-rw-r--r--chrome/browser/ui/gtk/extensions/extension_popup_gtk.cc2
-rw-r--r--chrome/browser/ui/gtk/first_run_dialog.cc4
-rw-r--r--chrome/browser/ui/gtk/importer/import_lock_dialog_gtk.cc2
-rw-r--r--chrome/browser/ui/gtk/infobars/after_translate_infobar_gtk.cc4
-rw-r--r--chrome/browser/ui/gtk/infobars/infobar_container_gtk.cc2
-rw-r--r--chrome/browser/ui/gtk/location_bar_view_gtk.cc4
-rw-r--r--chrome/browser/ui/gtk/menu_gtk.cc7
-rw-r--r--chrome/browser/ui/gtk/notifications/balloon_view_gtk.cc9
-rw-r--r--chrome/browser/ui/gtk/one_click_signin_bubble_gtk.cc3
-rw-r--r--chrome/browser/ui/gtk/panels/panel_gtk.cc10
-rw-r--r--chrome/browser/ui/gtk/process_singleton_dialog.cc4
-rw-r--r--chrome/browser/ui/gtk/protocol_dialog_gtk.cc2
-rw-r--r--chrome/browser/ui/gtk/reload_button_gtk.cc2
-rw-r--r--chrome/browser/ui/gtk/reload_button_gtk_unittest.cc2
-rw-r--r--chrome/browser/ui/gtk/simple_message_box_gtk.cc8
-rw-r--r--chrome/browser/ui/gtk/tabs/tab_gtk.cc8
-rw-r--r--chrome/browser/ui/gtk/tabs/tab_gtk.h3
-rw-r--r--chrome/browser/ui/gtk/tabs/tab_strip_gtk.cc10
-rw-r--r--chrome/browser/ui/gtk/tabs/tab_strip_gtk.h2
-rw-r--r--chrome/browser/ui/gtk/website_settings/website_settings_popup_gtk.cc2
-rw-r--r--chrome/browser/ui/omnibox/action_box_browsertest.cc2
-rw-r--r--chrome/browser/ui/omnibox/omnibox_view_browsertest.cc2
-rw-r--r--chrome/browser/ui/omnibox/omnibox_view_unittest.cc2
-rw-r--r--chrome/browser/ui/panels/base_panel_browser_test.cc2
-rw-r--r--chrome/browser/ui/panels/docked_panel_collection.cc5
-rw-r--r--chrome/browser/ui/panels/panel_browsertest.cc10
-rw-r--r--chrome/browser/ui/panels/panel_drag_browsertest.cc2
-rw-r--r--chrome/browser/ui/panels/panel_host.cc2
-rw-r--r--chrome/browser/ui/panels/panel_mouse_watcher_unittest.cc2
-rw-r--r--chrome/browser/ui/pdf/pdf_browsertest.cc2
-rw-r--r--chrome/browser/ui/search/instant_controller.cc5
-rw-r--r--chrome/browser/ui/search/instant_extended_interactive_uitest.cc6
-rw-r--r--chrome/browser/ui/search/instant_unload_handler.cc4
-rw-r--r--chrome/browser/ui/search_engines/keyword_editor_controller_unittest.cc2
-rw-r--r--chrome/browser/ui/startup/autolaunch_prompt_win.cc2
-rw-r--r--chrome/browser/ui/startup/default_browser_prompt.cc7
-rw-r--r--chrome/browser/ui/startup/startup_browser_creator_browsertest.cc4
-rw-r--r--chrome/browser/ui/startup/startup_browser_creator_interactive_uitest.cc2
-rw-r--r--chrome/browser/ui/sync/profile_signin_confirmation_helper_unittest.cc4
-rw-r--r--chrome/browser/ui/tab_modal_confirm_dialog_browsertest.cc4
-rw-r--r--chrome/browser/ui/tabs/hover_tab_selector.cc7
-rw-r--r--chrome/browser/ui/tabs/tab_audio_indicator_unittest.cc2
-rw-r--r--chrome/browser/ui/toolbar/back_forward_menu_model_unittest.cc4
-rw-r--r--chrome/browser/ui/toolbar/encoding_menu_controller_unittest.cc2
-rw-r--r--chrome/browser/ui/toolbar/wrench_icon_painter_unittest.cc2
-rw-r--r--chrome/browser/ui/unload_controller.cc2
-rw-r--r--chrome/browser/ui/views/accessibility/accessibility_event_router_views.cc2
-rw-r--r--chrome/browser/ui/views/accessibility/accessibility_event_router_views_unittest.cc18
-rw-r--r--chrome/browser/ui/views/app_list/app_list_controller_win.cc2
-rw-r--r--chrome/browser/ui/views/avatar_menu_button_browsertest.cc4
-rw-r--r--chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc6
-rw-r--r--chrome/browser/ui/views/bookmarks/bookmark_bar_view_test.cc30
-rw-r--r--chrome/browser/ui/views/bookmarks/bookmark_context_menu_test.cc2
-rw-r--r--chrome/browser/ui/views/bookmarks/bookmark_drag_drop_views.cc6
-rw-r--r--chrome/browser/ui/views/bookmarks/bookmark_editor_view_unittest.cc2
-rw-r--r--chrome/browser/ui/views/browser_action_view.cc2
-rw-r--r--chrome/browser/ui/views/browser_actions_container.cc2
-rw-r--r--chrome/browser/ui/views/button_dropdown_test.cc5
-rw-r--r--chrome/browser/ui/views/chrome_to_mobile_bubble_view.cc3
-rw-r--r--chrome/browser/ui/views/download/download_item_view.cc7
-rw-r--r--chrome/browser/ui/views/extensions/browser_action_overflow_menu_controller.cc2
-rw-r--r--chrome/browser/ui/views/extensions/extension_installed_bubble.cc4
-rw-r--r--chrome/browser/ui/views/external_tab_container_win.cc12
-rw-r--r--chrome/browser/ui/views/frame/browser_view.cc2
-rw-r--r--chrome/browser/ui/views/fullscreen_exit_bubble_views.cc2
-rw-r--r--chrome/browser/ui/views/importer/import_lock_dialog_view.cc8
-rw-r--r--chrome/browser/ui/views/infobars/infobar_container_view.cc2
-rw-r--r--chrome/browser/ui/views/keyboard_access_browsertest.cc8
-rw-r--r--chrome/browser/ui/views/location_bar/star_view_browsertest.cc2
-rw-r--r--chrome/browser/ui/views/menu_model_adapter_test.cc5
-rw-r--r--chrome/browser/ui/views/message_center/web_notification_tray_win.cc2
-rw-r--r--chrome/browser/ui/views/panels/panel_view.cc2
-rw-r--r--chrome/browser/ui/views/reload_button_unittest.cc2
-rw-r--r--chrome/browser/ui/views/select_file_dialog_extension.cc9
-rw-r--r--chrome/browser/ui/views/simple_message_box_views.cc5
-rw-r--r--chrome/browser/ui/views/status_bubble_views.cc6
-rw-r--r--chrome/browser/ui/views/sync/one_click_signin_bubble_view_browsertest.cc2
-rw-r--r--chrome/browser/ui/views/tab_contents/chrome_web_contents_view_delegate_views.cc3
-rw-r--r--chrome/browser/ui/views/tabs/tab_drag_controller.cc4
-rw-r--r--chrome/browser/ui/views/tabs/tab_drag_controller.h2
-rw-r--r--chrome/browser/ui/views/tabs/tab_drag_controller_interactive_uitest.cc8
-rw-r--r--chrome/browser/ui/views/tabs/tab_strip_unittest.cc2
-rw-r--r--chrome/browser/ui/views/uninstall_view.cc2
-rw-r--r--chrome/browser/ui/views/user_data_dir_dialog_view.cc2
-rw-r--r--chrome/browser/ui/views/user_data_dir_dialog_view.h2
-rw-r--r--chrome/browser/ui/views/web_dialog_view_browsertest.cc6
-rw-r--r--chrome/browser/ui/webui/bidi_checker_web_ui_test.cc5
-rw-r--r--chrome/browser/ui/webui/chromeos/login/network_state_informer.cc2
-rw-r--r--chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc4
-rw-r--r--chrome/browser/ui/webui/downloads_dom_handler.cc3
-rw-r--r--chrome/browser/ui/webui/downloads_dom_handler_browsertest.cc10
-rw-r--r--chrome/browser/ui/webui/favicon_source_unittest.cc8
-rw-r--r--chrome/browser/ui/webui/fileicon_source_unittest.cc8
-rw-r--r--chrome/browser/ui/webui/ntp/android/partner_bookmarks_shim_unittest.cc2
-rw-r--r--chrome/browser/ui/webui/sync_internals_ui_unittest.cc4
-rw-r--r--chrome/browser/ui/webui/sync_setup_handler.cc2
-rw-r--r--chrome/browser/ui/webui/sync_setup_handler_unittest.cc2
-rw-r--r--chrome/browser/ui/webui/theme_source_unittest.cc6
-rw-r--r--chrome/browser/ui/webui/web_ui_test_handler.cc4
-rw-r--r--chrome/browser/ui/window_sizer/window_sizer_ash_unittest.cc2
-rw-r--r--chrome/browser/ui/zoom/zoom_controller_unittest.cc2
159 files changed, 339 insertions, 317 deletions
diff --git a/chrome/browser/ui/app_list/app_list_controller_browsertest.cc b/chrome/browser/ui/app_list/app_list_controller_browsertest.cc
index ad4a565..fa5a4c4 100644
--- a/chrome/browser/ui/app_list/app_list_controller_browsertest.cc
+++ b/chrome/browser/ui/app_list/app_list_controller_browsertest.cc
@@ -25,7 +25,7 @@ class AppListControllerBrowserTest : public InProcessBrowserTest {
void OnProfileCreated(Profile* profile, Profile::CreateStatus status) {
if (status == Profile::CREATE_STATUS_INITIALIZED) {
profile2_ = profile;
- MessageLoop::current()->Quit();
+ base::MessageLoop::current()->Quit();
}
}
diff --git a/chrome/browser/ui/ash/chrome_shell_delegate.cc b/chrome/browser/ui/ash/chrome_shell_delegate.cc
index 56c4486..041db41 100644
--- a/chrome/browser/ui/ash/chrome_shell_delegate.cc
+++ b/chrome/browser/ui/ash/chrome_shell_delegate.cc
@@ -165,7 +165,7 @@ void ChromeShellDelegate::RestoreTab() {
// LoadTabsFromLastSession is asynchronous, so TabRestoreService has not
// finished loading the entries at this point. Wait for next event cycle
// which loads the restored tab entries.
- MessageLoop::current()->PostTask(
+ base::MessageLoop::current()->PostTask(
FROM_HERE,
base::Bind(&ChromeShellDelegate::RestoreTab,
weak_factory_.GetWeakPtr()));
diff --git a/chrome/browser/ui/ash/launcher/chrome_launcher_controller_per_browser_unittest.cc b/chrome/browser/ui/ash/launcher/chrome_launcher_controller_per_browser_unittest.cc
index b71fa11..248078d 100644
--- a/chrome/browser/ui/ash/launcher/chrome_launcher_controller_per_browser_unittest.cc
+++ b/chrome/browser/ui/ash/launcher/chrome_launcher_controller_per_browser_unittest.cc
@@ -112,7 +112,7 @@ class ChromeLauncherControllerPerBrowserTest : public testing::Test {
}
// Needed for extension service & friends to work.
- MessageLoop loop_;
+ base::MessageLoop loop_;
content::TestBrowserThread ui_thread_;
content::TestBrowserThread file_thread_;
diff --git a/chrome/browser/ui/ash/window_positioner_unittest.cc b/chrome/browser/ui/ash/window_positioner_unittest.cc
index 776c7ba..59a55a39 100644
--- a/chrome/browser/ui/ash/window_positioner_unittest.cc
+++ b/chrome/browser/ui/ash/window_positioner_unittest.cc
@@ -101,7 +101,7 @@ WindowPositionerTest::WindowPositionerTest()
: grid_size_(WindowPositioner::kMinimumWindowOffset),
window_positioner_(NULL) {
// Create a message loop.
- MessageLoopForUI* ui_loop = message_loop();
+ base::MessageLoopForUI* ui_loop = message_loop();
ui_thread_.reset(
new content::TestBrowserThread(content::BrowserThread::UI, ui_loop));
diff --git a/chrome/browser/ui/auto_login_infobar_delegate.cc b/chrome/browser/ui/auto_login_infobar_delegate.cc
index f59d298..b60a9f9 100644
--- a/chrome/browser/ui/auto_login_infobar_delegate.cc
+++ b/chrome/browser/ui/auto_login_infobar_delegate.cc
@@ -109,18 +109,18 @@ void AutoLoginRedirector::Observe(int type,
// The WebContents that started this has been destroyed. The request must be
// cancelled and this object must be deleted.
ubertoken_fetcher_.reset();
- MessageLoop::current()->DeleteSoon(FROM_HERE, this);
+ base::MessageLoop::current()->DeleteSoon(FROM_HERE, this);
}
void AutoLoginRedirector::OnUbertokenSuccess(const std::string& token) {
RedirectToMergeSession(token);
- MessageLoop::current()->DeleteSoon(FROM_HERE, this);
+ base::MessageLoop::current()->DeleteSoon(FROM_HERE, this);
}
void AutoLoginRedirector::OnUbertokenFailure(
const GoogleServiceAuthError& error) {
LOG(WARNING) << "AutoLoginRedirector: token request failed";
- MessageLoop::current()->DeleteSoon(FROM_HERE, this);
+ base::MessageLoop::current()->DeleteSoon(FROM_HERE, this);
}
void AutoLoginRedirector::RedirectToMergeSession(const std::string& token) {
diff --git a/chrome/browser/ui/autofill/autofill_dialog_controller_unittest.cc b/chrome/browser/ui/autofill/autofill_dialog_controller_unittest.cc
index 1c53139..c8f8f3d 100644
--- a/chrome/browser/ui/autofill/autofill_dialog_controller_unittest.cc
+++ b/chrome/browser/ui/autofill/autofill_dialog_controller_unittest.cc
@@ -322,7 +322,7 @@ class AutofillDialogControllerTest : public testing::Test {
// A bunch of threads are necessary for classes like TestWebContents and
// URLRequestContextGetter not to fall over.
- MessageLoopForUI loop_;
+ base::MessageLoopForUI loop_;
content::TestBrowserThread ui_thread_;
content::TestBrowserThread file_thread_;
content::TestBrowserThread file_blocking_thread_;
diff --git a/chrome/browser/ui/bookmarks/bookmark_context_menu_controller_unittest.cc b/chrome/browser/ui/bookmarks/bookmark_context_menu_controller_unittest.cc
index 6f12a6e..cac914b 100644
--- a/chrome/browser/ui/bookmarks/bookmark_context_menu_controller_unittest.cc
+++ b/chrome/browser/ui/bookmarks/bookmark_context_menu_controller_unittest.cc
@@ -63,7 +63,7 @@ class BookmarkContextMenuControllerTest : public testing::Test {
}
protected:
- MessageLoopForUI message_loop_;
+ base::MessageLoopForUI message_loop_;
content::TestBrowserThread ui_thread_;
content::TestBrowserThread file_thread_;
scoped_ptr<TestingProfile> profile_;
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index acbddd3..e85c898 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -1151,7 +1151,7 @@ void Browser::TabStripEmpty() {
// Note: This will be called several times if TabStripEmpty is called several
// times. This is because it does not close the window if tabs are
// still present.
- MessageLoop::current()->PostTask(
+ base::MessageLoop::current()->PostTask(
FROM_HERE, base::Bind(&Browser::CloseFrame, weak_factory_.GetWeakPtr()));
// Instant may have visible WebContents that need to be detached before the
@@ -1899,7 +1899,7 @@ void Browser::ScheduleUIUpdate(const WebContents* source,
if (!chrome_updater_factory_.HasWeakPtrs()) {
// No task currently scheduled, start another.
- MessageLoop::current()->PostDelayedTask(
+ base::MessageLoop::current()->PostDelayedTask(
FROM_HERE,
base::Bind(&Browser::ProcessPendingUIUpdates,
chrome_updater_factory_.GetWeakPtr()),
diff --git a/chrome/browser/ui/browser_browsertest.cc b/chrome/browser/ui/browser_browsertest.cc
index 7d6fa94..863567f 100644
--- a/chrome/browser/ui/browser_browsertest.cc
+++ b/chrome/browser/ui/browser_browsertest.cc
@@ -202,7 +202,7 @@ void CloseWindowCallback(Browser* browser) {
// menu.
void RunCloseWithAppMenuCallback(Browser* browser) {
// ShowAppMenu is modal under views. Schedule a task that closes the window.
- MessageLoop::current()->PostTask(
+ base::MessageLoop::current()->PostTask(
FROM_HERE, base::Bind(&CloseWindowCallback, browser));
chrome::ShowAppMenu(browser);
}
@@ -537,8 +537,9 @@ class BeforeUnloadAtQuitWithTwoWindows : public InProcessBrowserTest {
// Run the application event loop to completion, which will cycle the
// native MessagePump on all platforms.
- MessageLoop::current()->PostTask(FROM_HERE, MessageLoop::QuitClosure());
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->PostTask(FROM_HERE,
+ base::MessageLoop::QuitClosure());
+ base::MessageLoop::current()->Run();
// Take care of any remaining Cocoa work.
CycleRunLoops();
@@ -1171,7 +1172,7 @@ IN_PROC_BROWSER_TEST_F(BrowserTest, MAYBE_CloseWithAppMenuOpen) {
return;
// We need a message loop running for menus on windows.
- MessageLoop::current()->PostTask(
+ base::MessageLoop::current()->PostTask(
FROM_HERE, base::Bind(&RunCloseWithAppMenuCallback, browser()));
}
diff --git a/chrome/browser/ui/browser_focus_uitest.cc b/chrome/browser/ui/browser_focus_uitest.cc
index 9825fda..1f22006 100644
--- a/chrome/browser/ui/browser_focus_uitest.cc
+++ b/chrome/browser/ui/browser_focus_uitest.cc
@@ -140,9 +140,10 @@ bool ChromeInForeground() {
void CheckFocus(Browser* browser, ViewID id, const base::Time& timeout) {
if (ui_test_utils::IsViewFocused(browser, id) ||
base::Time::Now() > timeout) {
- MessageLoop::current()->PostTask(FROM_HERE, MessageLoop::QuitClosure());
+ base::MessageLoop::current()->PostTask(FROM_HERE,
+ base::MessageLoop::QuitClosure());
} else {
- MessageLoop::current()->PostDelayedTask(
+ base::MessageLoop::current()->PostDelayedTask(
FROM_HERE,
base::Bind(&CheckFocus, browser, id, timeout),
base::TimeDelta::FromMilliseconds(10));
@@ -162,7 +163,7 @@ class BrowserFocusTest : public InProcessBrowserTest {
bool WaitForFocusChange(ViewID vid) {
const base::Time timeout = base::Time::Now() +
base::TimeDelta::FromMilliseconds(kFocusChangeTimeoutMs);
- MessageLoop::current()->PostDelayedTask(
+ base::MessageLoop::current()->PostDelayedTask(
FROM_HERE,
base::Bind(&CheckFocus, browser(), vid, timeout),
base::TimeDelta::FromMilliseconds(100));
@@ -218,9 +219,9 @@ IN_PROC_BROWSER_TEST_F(BrowserFocusTest, MAYBE_ClickingMovesFocus) {
#if defined(OS_POSIX)
// It seems we have to wait a little bit for the widgets to spin up before
// we can start clicking on them.
- MessageLoop::current()->PostDelayedTask(
+ base::MessageLoop::current()->PostDelayedTask(
FROM_HERE,
- MessageLoop::QuitClosure(),
+ base::MessageLoop::QuitClosure(),
base::TimeDelta::FromMilliseconds(kActionDelayMs));
content::RunMessageLoop();
#endif // defined(OS_POSIX)
@@ -625,9 +626,10 @@ IN_PROC_BROWSER_TEST_F(BrowserFocusTest, MAYBE_FocusTraversalOnInterstitial) {
browser()->tab_strip_model()->GetActiveWebContents(),
true, GURL("http://interstitial.com"));
// Give some time for the interstitial to show.
- MessageLoop::current()->PostDelayedTask(FROM_HERE,
- MessageLoop::QuitClosure(),
- base::TimeDelta::FromSeconds(1));
+ base::MessageLoop::current()->PostDelayedTask(
+ FROM_HERE,
+ base::MessageLoop::QuitClosure(),
+ base::TimeDelta::FromSeconds(1));
content::RunMessageLoop();
chrome::FocusLocationBar(browser());
@@ -746,9 +748,10 @@ IN_PROC_BROWSER_TEST_F(BrowserFocusTest, DISABLED_InterstitialFocus) {
browser()->tab_strip_model()->GetActiveWebContents(),
true, GURL("http://interstitial.com"));
// Give some time for the interstitial to show.
- MessageLoop::current()->PostDelayedTask(FROM_HERE,
- MessageLoop::QuitClosure(),
- base::TimeDelta::FromSeconds(1));
+ base::MessageLoop::current()->PostDelayedTask(
+ FROM_HERE,
+ base::MessageLoop::QuitClosure(),
+ base::TimeDelta::FromSeconds(1));
content::RunMessageLoop();
// The interstitial should have focus now.
diff --git a/chrome/browser/ui/browser_tab_strip_model_delegate.cc b/chrome/browser/ui/browser_tab_strip_model_delegate.cc
index 1827915..fcf5f4f 100644
--- a/chrome/browser/ui/browser_tab_strip_model_delegate.cc
+++ b/chrome/browser/ui/browser_tab_strip_model_delegate.cc
@@ -107,7 +107,7 @@ void BrowserTabStripModelDelegate::CloseFrameAfterDragSession() {
// This is scheduled to run after we return to the message loop because
// otherwise the frame will think the drag session is still active and ignore
// the request.
- MessageLoop::current()->PostTask(
+ base::MessageLoop::current()->PostTask(
FROM_HERE,
base::Bind(&BrowserTabStripModelDelegate::CloseFrame,
weak_factory_.GetWeakPtr()));
diff --git a/chrome/browser/ui/chrome_select_file_policy_unittest.cc b/chrome/browser/ui/chrome_select_file_policy_unittest.cc
index 8b5ca82..41dcafc 100644
--- a/chrome/browser/ui/chrome_select_file_policy_unittest.cc
+++ b/chrome/browser/ui/chrome_select_file_policy_unittest.cc
@@ -89,7 +89,7 @@ typedef testing::Test ChromeSelectFilePolicyTest;
// Tests if SelectFileDialog::SelectFile returns asynchronously with
// file-selection dialogs disabled by policy.
TEST_F(ChromeSelectFilePolicyTest, MAYBE_ExpectAsynchronousListenerCall) {
- MessageLoopForUI message_loop;
+ base::MessageLoopForUI message_loop;
content::TestBrowserThread ui_thread(BrowserThread::UI, &message_loop);
ScopedTestingLocalState local_state(
diff --git a/chrome/browser/ui/cocoa/about_ipc_controller_unittest.mm b/chrome/browser/ui/cocoa/about_ipc_controller_unittest.mm
index 64c9351..3f4eee7 100644
--- a/chrome/browser/ui/cocoa/about_ipc_controller_unittest.mm
+++ b/chrome/browser/ui/cocoa/about_ipc_controller_unittest.mm
@@ -20,9 +20,9 @@ class AboutIPCControllerTest : public CocoaTest {
public:
virtual void SetUp() {
CocoaTest::SetUp();
- ui_message_loop_.reset(new MessageLoopForUI());
- ui_thread_.reset(new content::TestBrowserThread(content::BrowserThread::UI,
- MessageLoop::current()));
+ ui_message_loop_.reset(new base::MessageLoopForUI());
+ ui_thread_.reset(new content::TestBrowserThread(
+ content::BrowserThread::UI, base::MessageLoop::current()));
}
virtual void TearDown() {
@@ -31,7 +31,7 @@ class AboutIPCControllerTest : public CocoaTest {
}
private:
- scoped_ptr<MessageLoopForUI> ui_message_loop_;
+ scoped_ptr<base::MessageLoopForUI> ui_message_loop_;
scoped_ptr<content::TestBrowserThread> ui_thread_;
};
diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_hover_state_unittest.mm b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_hover_state_unittest.mm
index d7781e6..bb39d7d 100644
--- a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_hover_state_unittest.mm
+++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_hover_state_unittest.mm
@@ -18,7 +18,7 @@ class BookmarkBarFolderHoverStateTest : public CocoaTest {
// A strict call order is implied with these calls. It is ONLY valid to make
// these specific state transitions.
TEST_F(BookmarkBarFolderHoverStateTest, HoverState) {
- MessageLoopForUI message_loop;
+ base::MessageLoopForUI message_loop;
scoped_nsobject<BookmarkBarFolderHoverState> bbfhs;
bbfhs.reset([[BookmarkBarFolderHoverState alloc] init]);
@@ -47,7 +47,7 @@ TEST_F(BookmarkBarFolderHoverStateTest, HoverState) {
// Test transition from opening to opened.
message_loop.PostDelayedTask(
FROM_HERE,
- MessageLoop::QuitClosure(),
+ base::MessageLoop::QuitClosure(),
base::TimeDelta::FromMilliseconds(
bookmarks::kDragHoverOpenDelay * 1000.0 * 1.5));
message_loop.Run();
@@ -68,7 +68,7 @@ TEST_F(BookmarkBarFolderHoverStateTest, HoverState) {
ASSERT_EQ(kHoverStateClosing, [bbfhs hoverState]);
message_loop.PostDelayedTask(
FROM_HERE,
- MessageLoop::QuitClosure(),
+ base::MessageLoop::QuitClosure(),
base::TimeDelta::FromMilliseconds(
bookmarks::kDragHoverCloseDelay * 1000.0 * 1.5));
message_loop.Run();
diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_drag_drop_cocoa.mm b/chrome/browser/ui/cocoa/bookmarks/bookmark_drag_drop_cocoa.mm
index a26b120..3891519 100644
--- a/chrome/browser/ui/cocoa/bookmarks/bookmark_drag_drop_cocoa.mm
+++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_drag_drop_cocoa.mm
@@ -136,8 +136,8 @@ void DragBookmarks(Profile* profile,
DCHECK(!nodes.empty());
// Allow nested message loop so we get DnD events as we drag this around.
- bool was_nested = MessageLoop::current()->IsNested();
- MessageLoop::current()->SetNestableTasksAllowed(true);
+ bool was_nested = base::MessageLoop::current()->IsNested();
+ base::MessageLoop::current()->SetNestableTasksAllowed(true);
std::vector<BookmarkNodeData::Element> elements;
for (std::vector<const BookmarkNode*>::const_iterator it = nodes.begin();
@@ -180,7 +180,7 @@ void DragBookmarks(Profile* profile,
source:nil
slideBack:YES];
- MessageLoop::current()->SetNestableTasksAllowed(was_nested);
+ base::MessageLoop::current()->SetNestableTasksAllowed(was_nested);
}
} // namespace chrome
diff --git a/chrome/browser/ui/cocoa/browser_window_cocoa.mm b/chrome/browser/ui/cocoa/browser_window_cocoa.mm
index fdb36eb..773dff8 100644
--- a/chrome/browser/ui/cocoa/browser_window_cocoa.mm
+++ b/chrome/browser/ui/cocoa/browser_window_cocoa.mm
@@ -518,7 +518,7 @@ DownloadShelf* BrowserWindowCocoa::GetDownloadShelf() {
void BrowserWindowCocoa::ConfirmBrowserCloseWithPendingDownloads() {
// Call InProgressDownloadResponse asynchronously to avoid a crash when the
// browser window is closed here (http://crbug.com/44454).
- MessageLoop::current()->PostTask(FROM_HERE,
+ base::MessageLoop::current()->PostTask(FROM_HERE,
base::Bind(&Browser::InProgressDownloadResponse,
confirm_close_factory_.GetWeakPtr(), true));
}
diff --git a/chrome/browser/ui/cocoa/cocoa_profile_test.h b/chrome/browser/ui/cocoa/cocoa_profile_test.h
index 3cad698..484d302 100644
--- a/chrome/browser/ui/cocoa/cocoa_profile_test.h
+++ b/chrome/browser/ui/cocoa/cocoa_profile_test.h
@@ -57,7 +57,7 @@ class CocoaProfileTest : public CocoaTest {
virtual Browser* CreateBrowser();
private:
- MessageLoopForUI message_loop_;
+ base::MessageLoopForUI message_loop_;
content::TestBrowserThread ui_thread_;
TestingProfileManager profile_manager_;
diff --git a/chrome/browser/ui/cocoa/content_settings/collected_cookies_mac.mm b/chrome/browser/ui/cocoa/content_settings/collected_cookies_mac.mm
index bbafe4e..f1e44d9 100644
--- a/chrome/browser/ui/cocoa/content_settings/collected_cookies_mac.mm
+++ b/chrome/browser/ui/cocoa/content_settings/collected_cookies_mac.mm
@@ -105,7 +105,7 @@ void CollectedCookiesMac::PerformClose() {
void CollectedCookiesMac::OnConstrainedWindowClosed(
ConstrainedWindowMac* window) {
- MessageLoop::current()->DeleteSoon(FROM_HERE, this);
+ base::MessageLoop::current()->DeleteSoon(FROM_HERE, this);
}
#pragma mark Window Controller
diff --git a/chrome/browser/ui/cocoa/extensions/extension_install_dialog_controller.mm b/chrome/browser/ui/cocoa/extensions/extension_install_dialog_controller.mm
index c377236..eb08510 100644
--- a/chrome/browser/ui/cocoa/extensions/extension_install_dialog_controller.mm
+++ b/chrome/browser/ui/cocoa/extensions/extension_install_dialog_controller.mm
@@ -72,7 +72,7 @@ void ExtensionInstallDialogController::OnConstrainedWindowClosed(
ConstrainedWindowMac* window) {
if (delegate_)
delegate_->InstallUIAbort(false);
- MessageLoop::current()->DeleteSoon(FROM_HERE, this);
+ base::MessageLoop::current()->DeleteSoon(FROM_HERE, this);
}
// static
diff --git a/chrome/browser/ui/cocoa/external_protocol_dialog.mm b/chrome/browser/ui/cocoa/external_protocol_dialog.mm
index 5570997..094daa6 100644
--- a/chrome/browser/ui/cocoa/external_protocol_dialog.mm
+++ b/chrome/browser/ui/cocoa/external_protocol_dialog.mm
@@ -36,7 +36,7 @@ void ExternalProtocolHandler::RunExternalProtocolDialog(
@implementation ExternalProtocolDialogController
- (id)initWithGURL:(const GURL*)url {
- DCHECK_EQ(MessageLoop::TYPE_UI, MessageLoop::current()->type());
+ DCHECK_EQ(base::MessageLoop::TYPE_UI, base::MessageLoop::current()->type());
if (!(self = [super init]))
return nil;
diff --git a/chrome/browser/ui/cocoa/first_run_dialog.mm b/chrome/browser/ui/cocoa/first_run_dialog.mm
index 8e8514e..658495e 100644
--- a/chrome/browser/ui/cocoa/first_run_dialog.mm
+++ b/chrome/browser/ui/cocoa/first_run_dialog.mm
@@ -72,7 +72,7 @@ FirstRunShowBridge::FirstRunShowBridge(
void FirstRunShowBridge::ShowDialog() {
[controller_ show];
- MessageLoop::current()->QuitNow();
+ base::MessageLoop::current()->QuitNow();
}
FirstRunShowBridge::~FirstRunShowBridge() {}
@@ -181,9 +181,9 @@ bool ShowFirstRunDialog(Profile* profile) {
// Therefore the main MessageLoop is run so things work.
scoped_refptr<FirstRunShowBridge> bridge(new FirstRunShowBridge(self));
- MessageLoop::current()->PostTask(FROM_HERE,
+ base::MessageLoop::current()->PostTask(FROM_HERE,
base::Bind(&FirstRunShowBridge::ShowDialog, bridge.get()));
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
}
- (void)show {
diff --git a/chrome/browser/ui/cocoa/importer/import_lock_dialog_cocoa.mm b/chrome/browser/ui/cocoa/importer/import_lock_dialog_cocoa.mm
index e72ad1c..c3db086 100644
--- a/chrome/browser/ui/cocoa/importer/import_lock_dialog_cocoa.mm
+++ b/chrome/browser/ui/cocoa/importer/import_lock_dialog_cocoa.mm
@@ -30,7 +30,7 @@ void ShowImportLockDialog(gfx::NativeWindow parent,
[lock_alert setMessageText:l10n_util::GetNSStringWithFixup(
IDS_IMPORTER_LOCK_TITLE)];
- MessageLoop::current()->PostTask(
+ base::MessageLoop::current()->PostTask(
FROM_HERE,
base::Bind(callback, [lock_alert runModal] == NSAlertFirstButtonReturn));
content::RecordAction(UserMetricsAction("ImportLockDialogCocoa_Shown"));
diff --git a/chrome/browser/ui/cocoa/keystone_infobar_delegate.mm b/chrome/browser/ui/cocoa/keystone_infobar_delegate.mm
index 0ac2150..7543e90 100644
--- a/chrome/browser/ui/cocoa/keystone_infobar_delegate.mm
+++ b/chrome/browser/ui/cocoa/keystone_infobar_delegate.mm
@@ -101,7 +101,7 @@ KeystonePromotionInfoBarDelegate::KeystonePromotionInfoBarDelegate(
weak_ptr_factory_(this) {
const base::TimeDelta kCanExpireOnNavigationAfterDelay =
base::TimeDelta::FromSeconds(8);
- MessageLoop::current()->PostDelayedTask(FROM_HERE,
+ base::MessageLoop::current()->PostDelayedTask(FROM_HERE,
base::Bind(&KeystonePromotionInfoBarDelegate::SetCanExpire,
weak_ptr_factory_.GetWeakPtr()),
kCanExpireOnNavigationAfterDelay);
diff --git a/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm b/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm
index ad710b4..aace935 100644
--- a/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm
+++ b/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm
@@ -145,7 +145,7 @@ LocationBarViewMac::~LocationBarViewMac() {
void LocationBarViewMac::ShowFirstRunBubble() {
// We need the browser window to be shown before we can show the bubble, but
// we get called before that's happened.
- MessageLoop::current()->PostTask(FROM_HERE,
+ base::MessageLoop::current()->PostTask(FROM_HERE,
base::Bind(&LocationBarViewMac::ShowFirstRunBubbleInternal,
weak_ptr_factory_.GetWeakPtr()));
}
diff --git a/chrome/browser/ui/cocoa/location_bar/zoom_decoration_browsertest.mm b/chrome/browser/ui/cocoa/location_bar/zoom_decoration_browsertest.mm
index 25699db..76f89e6 100644
--- a/chrome/browser/ui/cocoa/location_bar/zoom_decoration_browsertest.mm
+++ b/chrome/browser/ui/cocoa/location_bar/zoom_decoration_browsertest.mm
@@ -74,8 +74,9 @@ class ZoomDecorationTest : public InProcessBrowserTest {
void OnZoomChanged(const content::HostZoomMap::ZoomLevelChange& host) {
if (should_quit_on_zoom_) {
- MessageLoop::current()->PostTask(FROM_HERE, base::Bind(
- &MessageLoop::Quit, base::Unretained(MessageLoop::current())));
+ base::MessageLoop::current()->PostTask(FROM_HERE, base::Bind(
+ &base::MessageLoop::Quit,
+ base::Unretained(base::MessageLoop::current())));
}
}
diff --git a/chrome/browser/ui/cocoa/menu_controller_unittest.mm b/chrome/browser/ui/cocoa/menu_controller_unittest.mm
index c5846f4..a2d6f1b 100644
--- a/chrome/browser/ui/cocoa/menu_controller_unittest.mm
+++ b/chrome/browser/ui/cocoa/menu_controller_unittest.mm
@@ -308,7 +308,7 @@ TEST_F(MenuControllerTest, Dynamic) {
TEST_F(MenuControllerTest, OpenClose) {
// ui::SimpleMenuModel posts a task that calls Delegate::MenuClosed. Create
// a MessageLoop for that purpose.
- MessageLoop message_loop(MessageLoop::TYPE_UI);
+ base::MessageLoop message_loop(base::MessageLoop::TYPE_UI);
// Create the model.
Delegate delegate;
diff --git a/chrome/browser/ui/cocoa/notifications/balloon_controller_unittest.mm b/chrome/browser/ui/cocoa/notifications/balloon_controller_unittest.mm
index f016e9d..d290879 100644
--- a/chrome/browser/ui/cocoa/notifications/balloon_controller_unittest.mm
+++ b/chrome/browser/ui/cocoa/notifications/balloon_controller_unittest.mm
@@ -60,10 +60,10 @@ class MockBalloonCollection : public BalloonCollection {
class BalloonControllerTest : public ChromeRenderViewHostTestHarness {
public:
BalloonControllerTest() :
- ui_thread_(BrowserThread::UI, MessageLoop::current()),
+ ui_thread_(BrowserThread::UI, base::MessageLoop::current()),
file_user_blocking_thread_(
- BrowserThread::FILE_USER_BLOCKING, MessageLoop::current()),
- io_thread_(BrowserThread::IO, MessageLoop::current()) {
+ BrowserThread::FILE_USER_BLOCKING, base::MessageLoop::current()),
+ io_thread_(BrowserThread::IO, base::MessageLoop::current()) {
}
virtual void SetUp() {
@@ -80,7 +80,7 @@ class BalloonControllerTest : public ChromeRenderViewHostTestHarness {
virtual void TearDown() {
collection_.reset();
browser_.reset();
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
ChromeRenderViewHostTestHarness::TearDown();
}
diff --git a/chrome/browser/ui/cocoa/one_click_signin_dialog_controller.mm b/chrome/browser/ui/cocoa/one_click_signin_dialog_controller.mm
index 92b4186..00b5a08 100644
--- a/chrome/browser/ui/cocoa/one_click_signin_dialog_controller.mm
+++ b/chrome/browser/ui/cocoa/one_click_signin_dialog_controller.mm
@@ -39,7 +39,7 @@ OneClickSigninDialogController::~OneClickSigninDialogController() {
void OneClickSigninDialogController::OnConstrainedWindowClosed(
ConstrainedWindowMac* window) {
[view_controller_ viewWillClose];
- MessageLoop::current()->DeleteSoon(FROM_HERE, this);
+ base::MessageLoop::current()->DeleteSoon(FROM_HERE, this);
}
void OneClickSigninDialogController::PerformClose() {
diff --git a/chrome/browser/ui/cocoa/panels/display_settings_provider_cocoa.mm b/chrome/browser/ui/cocoa/panels/display_settings_provider_cocoa.mm
index 519dbdc..2d20e09 100644
--- a/chrome/browser/ui/cocoa/panels/display_settings_provider_cocoa.mm
+++ b/chrome/browser/ui/cocoa/panels/display_settings_provider_cocoa.mm
@@ -136,7 +136,7 @@ void DisplaySettingsProviderCocoa::Observe(
void DisplaySettingsProviderCocoa::ActiveWorkSpaceChanged() {
// The active workspace notification might be received earlier than the
// browser window knows that it is not in active space.
- MessageLoop::current()->PostDelayedTask(
+ base::MessageLoop::current()->PostDelayedTask(
FROM_HERE,
base::Bind(&DisplaySettingsProviderCocoa::CheckFullScreenMode,
weak_factory_.GetWeakPtr(),
diff --git a/chrome/browser/ui/cocoa/status_bubble_mac.mm b/chrome/browser/ui/cocoa/status_bubble_mac.mm
index 96e5e1b..b2ff8ac 100644
--- a/chrome/browser/ui/cocoa/status_bubble_mac.mm
+++ b/chrome/browser/ui/cocoa/status_bubble_mac.mm
@@ -170,7 +170,7 @@ void StatusBubbleMac::SetURL(const GURL& url, const std::string& languages) {
if (is_expanded_ && !url.is_empty()) {
ExpandBubble();
} else if (original_url_text.length() > status.length()) {
- MessageLoop::current()->PostDelayedTask(FROM_HERE,
+ base::MessageLoop::current()->PostDelayedTask(FROM_HERE,
base::Bind(&StatusBubbleMac::ExpandBubble,
expand_timer_factory_.GetWeakPtr()),
base::TimeDelta::FromMilliseconds(kExpandHoverDelay));
@@ -523,7 +523,7 @@ void StatusBubbleMac::StartTimer(int64 delay_ms) {
// There can only be one running timer.
CancelTimer();
- MessageLoop::current()->PostDelayedTask(FROM_HERE,
+ base::MessageLoop::current()->PostDelayedTask(FROM_HERE,
base::Bind(&StatusBubbleMac::TimerFired, timer_factory_.GetWeakPtr()),
base::TimeDelta::FromMilliseconds(delay_ms));
}
diff --git a/chrome/browser/ui/cocoa/status_bubble_mac_unittest.mm b/chrome/browser/ui/cocoa/status_bubble_mac_unittest.mm
index ae99915..e2b4b30 100644
--- a/chrome/browser/ui/cocoa/status_bubble_mac_unittest.mm
+++ b/chrome/browser/ui/cocoa/status_bubble_mac_unittest.mm
@@ -174,7 +174,7 @@ class StatusBubbleMacTest : public CocoaTest {
return !IsPointInBubble(relative_x, relative_y);
}
- MessageLoop message_loop_;
+ base::MessageLoop message_loop_;
scoped_nsobject<StatusBubbleMacTestDelegate> delegate_;
StatusBubbleMac* bubble_; // Strong.
};
diff --git a/chrome/browser/ui/cocoa/tab_contents/render_view_context_menu_mac.mm b/chrome/browser/ui/cocoa/tab_contents/render_view_context_menu_mac.mm
index 50041aa..fca692d 100644
--- a/chrome/browser/ui/cocoa/tab_contents/render_view_context_menu_mac.mm
+++ b/chrome/browser/ui/cocoa/tab_contents/render_view_context_menu_mac.mm
@@ -88,7 +88,8 @@ void RenderViewContextMenuMac::PlatformInit() {
{
// Make sure events can be pumped while the menu is up.
- MessageLoop::ScopedNestableTaskAllower allow(MessageLoop::current());
+ base::MessageLoop::ScopedNestableTaskAllower allow(
+ base::MessageLoop::current());
// One of the events that could be pumped is |window.close()|.
// User-initiated event-tracking loops protect against this by
diff --git a/chrome/browser/ui/cocoa/tabs/tab_audio_indicator_view_mac_unittest.mm b/chrome/browser/ui/cocoa/tabs/tab_audio_indicator_view_mac_unittest.mm
index c238bf7..478df04 100644
--- a/chrome/browser/ui/cocoa/tabs/tab_audio_indicator_view_mac_unittest.mm
+++ b/chrome/browser/ui/cocoa/tabs/tab_audio_indicator_view_mac_unittest.mm
@@ -27,7 +27,7 @@ class TabAudioIndicatorViewMacTest : public CocoaTest {
}
TabAudioIndicatorViewMac* view_;
- MessageLoopForUI message_loop_; // Needed for ui::LinearAnimation.
+ base::MessageLoopForUI message_loop_; // Needed for ui::LinearAnimation.
private:
DISALLOW_COPY_AND_ASSIGN(TabAudioIndicatorViewMacTest);
diff --git a/chrome/browser/ui/cocoa/tabs/tab_projecting_image_view_unittest.mm b/chrome/browser/ui/cocoa/tabs/tab_projecting_image_view_unittest.mm
index 48dda87..25bc7dd 100644
--- a/chrome/browser/ui/cocoa/tabs/tab_projecting_image_view_unittest.mm
+++ b/chrome/browser/ui/cocoa/tabs/tab_projecting_image_view_unittest.mm
@@ -43,7 +43,7 @@ class TabProjectingImageViewTest : public CocoaTest {
[[test_window() contentView] addSubview:view_];
}
- MessageLoopForUI message_loop_; // Needed for ui::ThrobAnimation.
+ base::MessageLoopForUI message_loop_; // Needed for ui::ThrobAnimation.
TabProjectingImageView* view_;
};
diff --git a/chrome/browser/ui/cocoa/tabs/throbbing_image_view_unittest.mm b/chrome/browser/ui/cocoa/tabs/throbbing_image_view_unittest.mm
index bdc15a5..33f7f41 100644
--- a/chrome/browser/ui/cocoa/tabs/throbbing_image_view_unittest.mm
+++ b/chrome/browser/ui/cocoa/tabs/throbbing_image_view_unittest.mm
@@ -31,7 +31,7 @@ class ThrobbingImageViewTest : public CocoaTest {
[[test_window() contentView] addSubview:view_];
}
- MessageLoopForUI message_loop_; // Needed for ui::ThrobAnimation.
+ base::MessageLoopForUI message_loop_; // Needed for ui::ThrobAnimation.
ThrobbingImageView* view_;
};
diff --git a/chrome/browser/ui/cocoa/toolbar/wrench_toolbar_button_cell_unittest.mm b/chrome/browser/ui/cocoa/toolbar/wrench_toolbar_button_cell_unittest.mm
index 52226e1..79ee865 100644
--- a/chrome/browser/ui/cocoa/toolbar/wrench_toolbar_button_cell_unittest.mm
+++ b/chrome/browser/ui/cocoa/toolbar/wrench_toolbar_button_cell_unittest.mm
@@ -29,7 +29,7 @@ class WrenchToolbarButtonCellTest : public CocoaTest {
NSButton* button_;
scoped_nsobject<WrenchToolbarButtonCell> cell_;
- MessageLoopForUI message_loop_; // Needed for ui::Animation.
+ base::MessageLoopForUI message_loop_; // Needed for ui::Animation.
private:
DISALLOW_COPY_AND_ASSIGN(WrenchToolbarButtonCellTest);
diff --git a/chrome/browser/ui/content_settings/content_setting_bubble_model_unittest.cc b/chrome/browser/ui/content_settings/content_setting_bubble_model_unittest.cc
index bcfe705..ec0a725 100644
--- a/chrome/browser/ui/content_settings/content_setting_bubble_model_unittest.cc
+++ b/chrome/browser/ui/content_settings/content_setting_bubble_model_unittest.cc
@@ -27,8 +27,7 @@ using content::WebContentsTester;
class ContentSettingBubbleModelTest : public ChromeRenderViewHostTestHarness {
protected:
ContentSettingBubbleModelTest()
- : ui_thread_(BrowserThread::UI, MessageLoop::current()) {
- }
+ : ui_thread_(BrowserThread::UI, base::MessageLoop::current()) {}
virtual void SetUp() OVERRIDE {
ChromeRenderViewHostTestHarness::SetUp();
diff --git a/chrome/browser/ui/extensions/app_metro_infobar_delegate_win.cc b/chrome/browser/ui/extensions/app_metro_infobar_delegate_win.cc
index 8d35dbd..11dbf1a 100644
--- a/chrome/browser/ui/extensions/app_metro_infobar_delegate_win.cc
+++ b/chrome/browser/ui/extensions/app_metro_infobar_delegate_win.cc
@@ -53,9 +53,8 @@ void AppMetroInfoBarDelegateWin::Create(
// Use PostTask because we can get here in a COM SendMessage, and
// ActivateApplication can not be sent nested (returns error
// RPC_E_CANTCALLOUT_ININPUTSYNCCALL).
- MessageLoop::current()->PostTask(
- FROM_HERE,
- base::Bind(base::IgnoreResult(chrome::ActivateMetroChrome)));
+ base::MessageLoop::current()->PostTask(
+ FROM_HERE, base::Bind(base::IgnoreResult(chrome::ActivateMetroChrome)));
}
AppMetroInfoBarDelegateWin::AppMetroInfoBarDelegateWin(
diff --git a/chrome/browser/ui/find_bar/find_bar_host_browsertest.cc b/chrome/browser/ui/find_bar/find_bar_host_browsertest.cc
index 62824bc..dbcf654 100644
--- a/chrome/browser/ui/find_bar/find_bar_host_browsertest.cc
+++ b/chrome/browser/ui/find_bar/find_bar_host_browsertest.cc
@@ -69,7 +69,7 @@ const bool kCaseSensitive = true;
const int kMoveIterations = 30;
void HistoryServiceQueried(int) {
- MessageLoop::current()->Quit();
+ base::MessageLoop::current()->Quit();
}
} // namespace
@@ -1000,7 +1000,7 @@ IN_PROC_BROWSER_TEST_F(FindInPageControllerTest, FindMovesWhenObscuring) {
chrome::ShowFindBar(browser());
// This is needed on GTK because the reposition operation is asynchronous.
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
gfx::Point start_position;
gfx::Point position;
@@ -1445,12 +1445,12 @@ IN_PROC_BROWSER_TEST_F(FindInPageControllerTest, MAYBE_FitWindow) {
popup->window()->Show();
// On GTK, bounds change is asynchronous.
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EnsureFindBoxOpenForBrowser(popup);
// GTK adjusts FindBar size asynchronously.
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
ASSERT_LE(GetFindBarWidthForBrowser(popup),
popup->window()->GetBounds().width());
diff --git a/chrome/browser/ui/fullscreen/fullscreen_controller.cc b/chrome/browser/ui/fullscreen/fullscreen_controller.cc
index b1ff72f..6c9c340 100644
--- a/chrome/browser/ui/fullscreen/fullscreen_controller.cc
+++ b/chrome/browser/ui/fullscreen/fullscreen_controller.cc
@@ -468,9 +468,11 @@ void FullscreenController::UpdateNotificationRegistrations() {
void FullscreenController::PostFullscreenChangeNotification(
bool is_fullscreen) {
- MessageLoop::current()->PostTask(FROM_HERE,
+ base::MessageLoop::current()->PostTask(
+ FROM_HERE,
base::Bind(&FullscreenController::NotifyFullscreenChange,
- ptr_factory_.GetWeakPtr(), is_fullscreen));
+ ptr_factory_.GetWeakPtr(),
+ is_fullscreen));
}
void FullscreenController::NotifyFullscreenChange(bool is_fullscreen) {
diff --git a/chrome/browser/ui/gtk/avatar_menu_bubble_gtk.cc b/chrome/browser/ui/gtk/avatar_menu_bubble_gtk.cc
index 8d65fd8..a7e2826 100644
--- a/chrome/browser/ui/gtk/avatar_menu_bubble_gtk.cc
+++ b/chrome/browser/ui/gtk/avatar_menu_bubble_gtk.cc
@@ -68,7 +68,7 @@ AvatarMenuBubbleGtk::~AvatarMenuBubbleGtk() {}
void AvatarMenuBubbleGtk::OnDestroy(GtkWidget* widget) {
// We are self deleting, we have a destroy signal setup to catch when we
// destroyed (via the BubbleGtk being destroyed), and delete ourself.
- MessageLoop::current()->DeleteSoon(FROM_HERE, this);
+ base::MessageLoop::current()->DeleteSoon(FROM_HERE, this);
}
void AvatarMenuBubbleGtk::BubbleClosing(BubbleGtk* bubble,
diff --git a/chrome/browser/ui/gtk/back_forward_button_gtk.cc b/chrome/browser/ui/gtk/back_forward_button_gtk.cc
index d2c5f03..572f8e0 100644
--- a/chrome/browser/ui/gtk/back_forward_button_gtk.cc
+++ b/chrome/browser/ui/gtk/back_forward_button_gtk.cc
@@ -105,7 +105,7 @@ gboolean BackForwardButtonGtk::OnButtonPress(GtkWidget* widget,
return FALSE;
y_position_of_last_press_ = static_cast<int>(event->y);
- MessageLoop::current()->PostDelayedTask(
+ base::MessageLoop::current()->PostDelayedTask(
FROM_HERE,
base::Bind(&BackForwardButtonGtk::ShowBackForwardMenu,
weak_factory_.GetWeakPtr(),
diff --git a/chrome/browser/ui/gtk/bookmarks/bookmark_bar_gtk.cc b/chrome/browser/ui/gtk/bookmarks/bookmark_bar_gtk.cc
index e6d3bb7..b8aa6e7 100644
--- a/chrome/browser/ui/gtk/bookmarks/bookmark_bar_gtk.cc
+++ b/chrome/browser/ui/gtk/bookmarks/bookmark_bar_gtk.cc
@@ -1457,7 +1457,7 @@ void BookmarkBarGtk::OnParentSizeAllocate(GtkWidget* widget,
// gtk_widget_queue_draw by itself does not work, despite that it claims to
// be asynchronous.
if (bookmark_bar_state_ == BookmarkBar::DETACHED) {
- MessageLoop::current()->PostTask(
+ base::MessageLoop::current()->PostTask(
FROM_HERE,
base::Bind(&BookmarkBarGtk::PaintEventBox, weak_factory_.GetWeakPtr()));
}
diff --git a/chrome/browser/ui/gtk/bookmarks/bookmark_bar_gtk_interactive_uitest.cc b/chrome/browser/ui/gtk/bookmarks/bookmark_bar_gtk_interactive_uitest.cc
index 9718e28..fe0922d 100644
--- a/chrome/browser/ui/gtk/bookmarks/bookmark_bar_gtk_interactive_uitest.cc
+++ b/chrome/browser/ui/gtk/bookmarks/bookmark_bar_gtk_interactive_uitest.cc
@@ -45,7 +45,7 @@ IN_PROC_BROWSER_TEST_F(BookmarkBarGtkInteractiveUITest, FindBarTest) {
browser()->tab_strip_model()->ActivateTabAt(1, false);
// Wait for the findbar to show.
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
// Set focus somewhere else, so that we can test clicking on the findbar
// works.
@@ -71,7 +71,7 @@ IN_PROC_BROWSER_TEST_F(
chrome::NewTab(browser());
// Wait for the floating bar to appear.
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
// This is kind of a hack. Calling this just once doesn't seem to send a click
// event, but doing it twice works.
diff --git a/chrome/browser/ui/gtk/bookmarks/bookmark_bar_gtk_unittest.cc b/chrome/browser/ui/gtk/bookmarks/bookmark_bar_gtk_unittest.cc
index 5bbfd9b..a91d142 100644
--- a/chrome/browser/ui/gtk/bookmarks/bookmark_bar_gtk_unittest.cc
+++ b/chrome/browser/ui/gtk/bookmarks/bookmark_bar_gtk_unittest.cc
@@ -61,7 +61,7 @@ class BookmarkBarGtkUnittest : public testing::Test {
BookmarkModel* model_;
- MessageLoopForUI message_loop_;
+ base::MessageLoopForUI message_loop_;
content::TestBrowserThread ui_thread_;
content::TestBrowserThread file_thread_;
diff --git a/chrome/browser/ui/gtk/bookmarks/bookmark_bubble_gtk.cc b/chrome/browser/ui/gtk/bookmarks/bookmark_bubble_gtk.cc
index 5347052..4bde298 100644
--- a/chrome/browser/ui/gtk/bookmarks/bookmark_bubble_gtk.cc
+++ b/chrome/browser/ui/gtk/bookmarks/bookmark_bubble_gtk.cc
@@ -232,7 +232,7 @@ void BookmarkBubbleGtk::OnFolderChanged(GtkWidget* widget) {
// signal. Since showing the editor also closes the bubble, delay this
// so that GTK can unwind. Specifically gtk_menu_shell_button_release
// will run, and we need to keep the combo box alive until then.
- MessageLoop::current()->PostTask(
+ base::MessageLoop::current()->PostTask(
FROM_HERE,
base::Bind(&BookmarkBubbleGtk::ShowEditor, factory_.GetWeakPtr()));
}
diff --git a/chrome/browser/ui/gtk/bookmarks/bookmark_editor_gtk.cc b/chrome/browser/ui/gtk/bookmarks/bookmark_editor_gtk.cc
index 420afd3..6f3af45 100644
--- a/chrome/browser/ui/gtk/bookmarks/bookmark_editor_gtk.cc
+++ b/chrome/browser/ui/gtk/bookmarks/bookmark_editor_gtk.cc
@@ -619,7 +619,7 @@ gboolean BookmarkEditorGtk::OnWindowDeleteEvent(GtkWidget* widget,
}
void BookmarkEditorGtk::OnWindowDestroy(GtkWidget* widget) {
- MessageLoop::current()->DeleteSoon(FROM_HERE, this);
+ base::MessageLoop::current()->DeleteSoon(FROM_HERE, this);
}
void BookmarkEditorGtk::OnEntryChanged(GtkWidget* entry) {
diff --git a/chrome/browser/ui/gtk/bookmarks/bookmark_editor_gtk_unittest.cc b/chrome/browser/ui/gtk/bookmarks/bookmark_editor_gtk_unittest.cc
index dfdcb7e..cb8fe19 100644
--- a/chrome/browser/ui/gtk/bookmarks/bookmark_editor_gtk_unittest.cc
+++ b/chrome/browser/ui/gtk/bookmarks/bookmark_editor_gtk_unittest.cc
@@ -99,7 +99,7 @@ class BookmarkEditorGtkTest : public testing::Test {
GURL(test_base + "sa"));
}
- MessageLoopForUI message_loop_;
+ base::MessageLoopForUI message_loop_;
content::TestBrowserThread ui_thread_;
content::TestBrowserThread file_thread_;
};
diff --git a/chrome/browser/ui/gtk/browser_actions_toolbar_gtk.cc b/chrome/browser/ui/gtk/browser_actions_toolbar_gtk.cc
index 2bd8b00..103bd97 100644
--- a/chrome/browser/ui/gtk/browser_actions_toolbar_gtk.cc
+++ b/chrome/browser/ui/gtk/browser_actions_toolbar_gtk.cc
@@ -946,7 +946,7 @@ void BrowserActionsToolbarGtk::OnSetFocus(GtkWidget* widget,
// call stack.
if (!popup || popup->being_inspected())
return;
- MessageLoop::current()->PostTask(
+ base::MessageLoop::current()->PostTask(
FROM_HERE,
base::Bind(&BrowserActionsToolbarGtk::HidePopup,
weak_factory_.GetWeakPtr()));
diff --git a/chrome/browser/ui/gtk/browser_window_gtk.cc b/chrome/browser/ui/gtk/browser_window_gtk.cc
index 97f7b75..e594a6c 100644
--- a/chrome/browser/ui/gtk/browser_window_gtk.cc
+++ b/chrome/browser/ui/gtk/browser_window_gtk.cc
@@ -1415,7 +1415,7 @@ void BrowserWindowGtk::OnMainWindowDestroy(GtkWidget* widget) {
//
// We don't want to use DeleteSoon() here since it won't work on a nested pump
// (like in UI tests).
- MessageLoop::current()->PostTask(
+ base::MessageLoop::current()->PostTask(
FROM_HERE, base::Bind(&base::DeletePointer<BrowserWindowGtk>, this));
}
diff --git a/chrome/browser/ui/gtk/chrome_to_mobile_bubble_gtk.cc b/chrome/browser/ui/gtk/chrome_to_mobile_bubble_gtk.cc
index fdfc8c7..4cb4ef8 100644
--- a/chrome/browser/ui/gtk/chrome_to_mobile_bubble_gtk.cc
+++ b/chrome/browser/ui/gtk/chrome_to_mobile_bubble_gtk.cc
@@ -125,9 +125,11 @@ void ChromeToMobileBubbleGtk::OnSendComplete(bool success) {
if (success) {
gtk_button_set_label(GTK_BUTTON(send_),
l10n_util::GetStringUTF8(IDS_CHROME_TO_MOBILE_BUBBLE_SENT).c_str());
- MessageLoop::current()->PostDelayedTask(FROM_HERE,
+ base::MessageLoop::current()->PostDelayedTask(
+ FROM_HERE,
base::Bind(&ChromeToMobileBubbleGtk::OnCancelClicked,
- weak_ptr_factory_.GetWeakPtr(), GTK_WIDGET(NULL)),
+ weak_ptr_factory_.GetWeakPtr(),
+ GTK_WIDGET(NULL)),
base::TimeDelta::FromSeconds(kAutoCloseDelay));
} else {
gtk_button_set_label(GTK_BUTTON(send_),
diff --git a/chrome/browser/ui/gtk/download/download_item_gtk.cc b/chrome/browser/ui/gtk/download/download_item_gtk.cc
index 888dcd4..b401f5d 100644
--- a/chrome/browser/ui/gtk/download/download_item_gtk.cc
+++ b/chrome/browser/ui/gtk/download/download_item_gtk.cc
@@ -820,7 +820,7 @@ void DownloadItemGtk::ReenableHbox() {
void DownloadItemGtk::OnDownloadOpened(DownloadItem* download) {
disabled_while_opening_ = true;
gtk_widget_set_sensitive(hbox_.get(), false);
- MessageLoop::current()->PostDelayedTask(
+ base::MessageLoop::current()->PostDelayedTask(
FROM_HERE,
base::Bind(&DownloadItemGtk::ReenableHbox,
weak_ptr_factory_.GetWeakPtr()),
diff --git a/chrome/browser/ui/gtk/download/download_shelf_gtk.cc b/chrome/browser/ui/gtk/download/download_shelf_gtk.cc
index 636b0e3..d709c76 100644
--- a/chrome/browser/ui/gtk/download/download_shelf_gtk.cc
+++ b/chrome/browser/ui/gtk/download/download_shelf_gtk.cc
@@ -339,9 +339,9 @@ void DownloadShelfGtk::SetCloseOnMouseOut(bool close) {
close_on_mouse_out_ = close;
mouse_in_shelf_ = close;
if (close)
- MessageLoopForUI::current()->AddObserver(this);
+ base::MessageLoopForUI::current()->AddObserver(this);
else
- MessageLoopForUI::current()->RemoveObserver(this);
+ base::MessageLoopForUI::current()->RemoveObserver(this);
}
void DownloadShelfGtk::WillProcessEvent(GdkEvent* event) {
@@ -394,10 +394,10 @@ bool DownloadShelfGtk::IsCursorInShelfZone(
void DownloadShelfGtk::MouseLeftShelf() {
DCHECK(close_on_mouse_out_);
- MessageLoop::current()->PostDelayedTask(
+ base::MessageLoop::current()->PostDelayedTask(
FROM_HERE,
- base::Bind(&DownloadShelfGtk::Close, weak_factory_.GetWeakPtr(),
- AUTOMATIC),
+ base::Bind(
+ &DownloadShelfGtk::Close, weak_factory_.GetWeakPtr(), AUTOMATIC),
base::TimeDelta::FromMilliseconds(kAutoCloseDelayMs));
}
diff --git a/chrome/browser/ui/gtk/download/download_shelf_gtk.h b/chrome/browser/ui/gtk/download/download_shelf_gtk.h
index 099afaf..18e5bd4 100644
--- a/chrome/browser/ui/gtk/download/download_shelf_gtk.h
+++ b/chrome/browser/ui/gtk/download/download_shelf_gtk.h
@@ -37,7 +37,7 @@ class Point;
class DownloadShelfGtk : public DownloadShelf,
public content::NotificationObserver,
public SlideAnimatorGtk::Delegate,
- public MessageLoopForUI::Observer {
+ public base::MessageLoopForUI::Observer {
public:
DownloadShelfGtk(Browser* browser, gfx::NativeView view);
diff --git a/chrome/browser/ui/gtk/download/download_started_animation_gtk.cc b/chrome/browser/ui/gtk/download/download_started_animation_gtk.cc
index 8358a24..9f49ed1 100644
--- a/chrome/browser/ui/gtk/download/download_started_animation_gtk.cc
+++ b/chrome/browser/ui/gtk/download/download_started_animation_gtk.cc
@@ -173,7 +173,7 @@ void DownloadStartedAnimationGtk::Close() {
web_contents_ = NULL;
gtk_widget_destroy(popup_);
- MessageLoop::current()->DeleteSoon(FROM_HERE, this);
+ base::MessageLoop::current()->DeleteSoon(FROM_HERE, this);
}
void DownloadStartedAnimationGtk::AnimateToState(double state) {
diff --git a/chrome/browser/ui/gtk/edit_search_engine_dialog.cc b/chrome/browser/ui/gtk/edit_search_engine_dialog.cc
index 0c11cb6..2fe2d37 100644
--- a/chrome/browser/ui/gtk/edit_search_engine_dialog.cc
+++ b/chrome/browser/ui/gtk/edit_search_engine_dialog.cc
@@ -272,5 +272,5 @@ void EditSearchEngineDialog::OnResponse(GtkWidget* dialog, int response_id) {
}
void EditSearchEngineDialog::OnWindowDestroy(GtkWidget* widget) {
- MessageLoop::current()->DeleteSoon(FROM_HERE, this);
+ base::MessageLoop::current()->DeleteSoon(FROM_HERE, this);
}
diff --git a/chrome/browser/ui/gtk/extensions/bundle_installed_bubble_gtk.cc b/chrome/browser/ui/gtk/extensions/bundle_installed_bubble_gtk.cc
index 29c03ee..cf1406e 100644
--- a/chrome/browser/ui/gtk/extensions/bundle_installed_bubble_gtk.cc
+++ b/chrome/browser/ui/gtk/extensions/bundle_installed_bubble_gtk.cc
@@ -131,9 +131,8 @@ void BundleInstalledBubbleGtk::BubbleClosing(BubbleGtk* bubble,
// We need to allow the bubble to close and remove the widgets from
// the window before we call Release() because close_button_ depends
// on all references being cleared before it is destroyed.
- MessageLoopForUI::current()->PostTask(
- FROM_HERE,
- base::Bind(&BundleInstalledBubbleGtk::Close, this));
+ base::MessageLoopForUI::current()->PostTask(
+ FROM_HERE, base::Bind(&BundleInstalledBubbleGtk::Close, this));
}
void BundleInstalledBubbleGtk::Close() {
diff --git a/chrome/browser/ui/gtk/extensions/extension_installed_bubble_gtk.cc b/chrome/browser/ui/gtk/extensions/extension_installed_bubble_gtk.cc
index f36bf63..b65c486 100644
--- a/chrome/browser/ui/gtk/extensions/extension_installed_bubble_gtk.cc
+++ b/chrome/browser/ui/gtk/extensions/extension_installed_bubble_gtk.cc
@@ -118,7 +118,7 @@ void ExtensionInstalledBubbleGtk::Observe(
content::Details<const Extension>(details).ptr();
if (extension == extension_) {
// PostTask to ourself to allow all EXTENSION_LOADED Observers to run.
- MessageLoopForUI::current()->PostTask(
+ base::MessageLoopForUI::current()->PostTask(
FROM_HERE,
base::Bind(&ExtensionInstalledBubbleGtk::ShowInternal,
weak_factory_.GetWeakPtr()));
@@ -154,7 +154,7 @@ void ExtensionInstalledBubbleGtk::ShowInternal() {
browser_window->GetToolbar()->GetBrowserActionsToolbar();
if (toolbar->animating() && animation_wait_retries_-- > 0) {
- MessageLoopForUI::current()->PostDelayedTask(
+ base::MessageLoopForUI::current()->PostDelayedTask(
FROM_HERE,
base::Bind(&ExtensionInstalledBubbleGtk::ShowInternal,
weak_factory_.GetWeakPtr()),
diff --git a/chrome/browser/ui/gtk/extensions/extension_popup_gtk.cc b/chrome/browser/ui/gtk/extensions/extension_popup_gtk.cc
index 8b65481..2b82adf 100644
--- a/chrome/browser/ui/gtk/extensions/extension_popup_gtk.cc
+++ b/chrome/browser/ui/gtk/extensions/extension_popup_gtk.cc
@@ -122,7 +122,7 @@ void ExtensionPopupGtk::OnDevToolsStateChanged(
// If the devtools window is closing, we post a task to ourselves to
// close the popup. This gives the devtools window a chance to finish
// detaching from the inspected RenderViewHost.
- MessageLoop::current()->PostTask(
+ base::MessageLoop::current()->PostTask(
FROM_HERE,
base::Bind(&ExtensionPopupGtk::DestroyPopupWithoutResult,
weak_factory_.GetWeakPtr()));
diff --git a/chrome/browser/ui/gtk/first_run_dialog.cc b/chrome/browser/ui/gtk/first_run_dialog.cc
index 31695e6..85e1b76 100644
--- a/chrome/browser/ui/gtk/first_run_dialog.cc
+++ b/chrome/browser/ui/gtk/first_run_dialog.cc
@@ -95,7 +95,7 @@ bool FirstRunDialog::Show() {
// but that spins a nested message loop and hoses us. :(
// http://code.google.com/p/chromium/issues/detail?id=12552
// Instead, run a loop directly here.
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
}
#endif // defined(GOOGLE_CHROME_BUILD)
return dialog_shown;
@@ -195,6 +195,6 @@ void FirstRunDialog::FirstRunDone() {
if (dialog_)
gtk_widget_destroy(dialog_);
- MessageLoop::current()->Quit();
+ base::MessageLoop::current()->Quit();
delete this;
}
diff --git a/chrome/browser/ui/gtk/importer/import_lock_dialog_gtk.cc b/chrome/browser/ui/gtk/importer/import_lock_dialog_gtk.cc
index 584a2b5..79fe5e6 100644
--- a/chrome/browser/ui/gtk/importer/import_lock_dialog_gtk.cc
+++ b/chrome/browser/ui/gtk/importer/import_lock_dialog_gtk.cc
@@ -66,7 +66,7 @@ ImportLockDialogGtk::ImportLockDialogGtk(
ImportLockDialogGtk::~ImportLockDialogGtk() {}
void ImportLockDialogGtk::OnResponse(GtkWidget* dialog, int response_id) {
- MessageLoop::current()->PostTask(
+ base::MessageLoop::current()->PostTask(
FROM_HERE,
base::Bind(callback_, response_id == GTK_RESPONSE_ACCEPT));
gtk_widget_destroy(dialog_);
diff --git a/chrome/browser/ui/gtk/infobars/after_translate_infobar_gtk.cc b/chrome/browser/ui/gtk/infobars/after_translate_infobar_gtk.cc
index 17ea973..da3db66 100644
--- a/chrome/browser/ui/gtk/infobars/after_translate_infobar_gtk.cc
+++ b/chrome/browser/ui/gtk/infobars/after_translate_infobar_gtk.cc
@@ -97,7 +97,7 @@ void AfterTranslateInfoBar::OnOriginalLanguageModified(GtkWidget* sender) {
// Setting the language will lead to a new translation that is going to close
// the infobar. This is not OK to do this from the signal handler, so we'll
// defer it.
- MessageLoop::current()->PostTask(
+ base::MessageLoop::current()->PostTask(
FROM_HERE,
base::Bind(&AfterTranslateInfoBar::SetOriginalLanguage,
weak_factory_.GetWeakPtr(),
@@ -110,7 +110,7 @@ void AfterTranslateInfoBar::OnTargetLanguageModified(GtkWidget* sender) {
return;
// See comment in OnOriginalLanguageModified on why we use a task.
- MessageLoop::current()->PostTask(
+ base::MessageLoop::current()->PostTask(
FROM_HERE,
base::Bind(&AfterTranslateInfoBar::SetTargetLanguage,
weak_factory_.GetWeakPtr(),
diff --git a/chrome/browser/ui/gtk/infobars/infobar_container_gtk.cc b/chrome/browser/ui/gtk/infobars/infobar_container_gtk.cc
index 8c9bc75..60b4a31 100644
--- a/chrome/browser/ui/gtk/infobars/infobar_container_gtk.cc
+++ b/chrome/browser/ui/gtk/infobars/infobar_container_gtk.cc
@@ -83,7 +83,7 @@ void InfoBarContainerGtk::PlatformSpecificRemoveInfoBar(InfoBar* infobar) {
if (it != infobars_gtk_.end())
infobars_gtk_.erase(it);
- MessageLoop::current()->DeleteSoon(FROM_HERE, infobar);
+ base::MessageLoop::current()->DeleteSoon(FROM_HERE, infobar);
}
void InfoBarContainerGtk::PlatformSpecificInfoBarStateChanged(
diff --git a/chrome/browser/ui/gtk/location_bar_view_gtk.cc b/chrome/browser/ui/gtk/location_bar_view_gtk.cc
index 56cd93f..c774c18 100644
--- a/chrome/browser/ui/gtk/location_bar_view_gtk.cc
+++ b/chrome/browser/ui/gtk/location_bar_view_gtk.cc
@@ -264,7 +264,7 @@ void ContentSettingImageViewGtk::Update(WebContents* web_contents) {
void ContentSettingImageViewGtk::AnimationEnded(
const ui::Animation* animation) {
if (animation_.IsShowing()) {
- MessageLoop::current()->PostDelayedTask(
+ base::MessageLoop::current()->PostDelayedTask(
FROM_HERE,
base::Bind(&ContentSettingImageViewGtk::CloseAnimation,
weak_factory_.GetWeakPtr()),
@@ -841,7 +841,7 @@ InstantController* LocationBarViewGtk::GetInstant() {
void LocationBarViewGtk::ShowFirstRunBubble() {
// We need the browser window to be shown before we can show the bubble, but
// we get called before that's happened.
- MessageLoop::current()->PostTask(
+ base::MessageLoop::current()->PostTask(
FROM_HERE,
base::Bind(&LocationBarViewGtk::ShowFirstRunBubbleInternal,
weak_ptr_factory_.GetWeakPtr()));
diff --git a/chrome/browser/ui/gtk/menu_gtk.cc b/chrome/browser/ui/gtk/menu_gtk.cc
index 39696f0..b7a8b25 100644
--- a/chrome/browser/ui/gtk/menu_gtk.cc
+++ b/chrome/browser/ui/gtk/menu_gtk.cc
@@ -741,9 +741,8 @@ void MenuGtk::ExecuteCommand(ui::MenuModel* model, int id) {
void MenuGtk::OnMenuShow(GtkWidget* widget) {
model_->MenuWillShow();
- MessageLoop::current()->PostTask(
- FROM_HERE,
- base::Bind(&MenuGtk::UpdateMenu, weak_factory_.GetWeakPtr()));
+ base::MessageLoop::current()->PostTask(
+ FROM_HERE, base::Bind(&MenuGtk::UpdateMenu, weak_factory_.GetWeakPtr()));
}
void MenuGtk::OnMenuHidden(GtkWidget* widget) {
@@ -798,7 +797,7 @@ void MenuGtk::OnSubMenuHidden(GtkWidget* submenu) {
// the reference count again. Note that the delay is just an optimization; we
// could use PostTask() and this would still work correctly.
g_object_ref(G_OBJECT(submenu));
- MessageLoop::current()->PostDelayedTask(
+ base::MessageLoop::current()->PostDelayedTask(
FROM_HERE,
base::Bind(&MenuGtk::OnSubMenuHiddenCallback, submenu),
base::TimeDelta::FromSeconds(2));
diff --git a/chrome/browser/ui/gtk/notifications/balloon_view_gtk.cc b/chrome/browser/ui/gtk/notifications/balloon_view_gtk.cc
index 80da5f5..541328e 100644
--- a/chrome/browser/ui/gtk/notifications/balloon_view_gtk.cc
+++ b/chrome/browser/ui/gtk/notifications/balloon_view_gtk.cc
@@ -123,7 +123,7 @@ void BalloonViewImpl::Close(bool by_user) {
if (!by_user && menu_showing_) {
pending_close_ = true;
} else {
- MessageLoop::current()->PostTask(
+ base::MessageLoop::current()->PostTask(
FROM_HERE,
base::Bind(&BalloonViewImpl::DelayedClose,
weak_factory_.GetWeakPtr(),
@@ -467,11 +467,10 @@ void BalloonViewImpl::OnOptionsMenuButton(GtkWidget* widget,
void BalloonViewImpl::StoppedShowing() {
menu_showing_ = false;
if (pending_close_) {
- MessageLoop::current()->PostTask(
+ base::MessageLoop::current()->PostTask(
FROM_HERE,
- base::Bind(&BalloonViewImpl::DelayedClose,
- weak_factory_.GetWeakPtr(),
- false));
+ base::Bind(
+ &BalloonViewImpl::DelayedClose, weak_factory_.GetWeakPtr(), false));
}
}
diff --git a/chrome/browser/ui/gtk/one_click_signin_bubble_gtk.cc b/chrome/browser/ui/gtk/one_click_signin_bubble_gtk.cc
index d3bb9d3..c6a8a23 100644
--- a/chrome/browser/ui/gtk/one_click_signin_bubble_gtk.cc
+++ b/chrome/browser/ui/gtk/one_click_signin_bubble_gtk.cc
@@ -61,7 +61,8 @@ void OneClickSigninBubbleGtk::BubbleClosing(
// |close_button_| (which is a CustomDrawButton) can be destroyed, because it
// depends on all references being cleared for the GtkWidget before it is
// destroyed.
- MessageLoopForUI::current()->DeleteSoon(FROM_HERE, close_button_.release());
+ base::MessageLoopForUI::current()->DeleteSoon(FROM_HERE,
+ close_button_.release());
delete this;
}
diff --git a/chrome/browser/ui/gtk/panels/panel_gtk.cc b/chrome/browser/ui/gtk/panels/panel_gtk.cc
index 19a597c..2a03450 100644
--- a/chrome/browser/ui/gtk/panels/panel_gtk.cc
+++ b/chrome/browser/ui/gtk/panels/panel_gtk.cc
@@ -717,7 +717,7 @@ void PanelGtk::OnMainWindowDestroy(GtkWidget* widget) {
//
// We don't want to use DeleteSoon() here since it won't work on a nested pump
// (like in UI tests).
- MessageLoop::current()->PostTask(
+ base::MessageLoop::current()->PostTask(
FROM_HERE, base::Bind(&base::DeletePointer<PanelGtk>, this));
}
@@ -1061,7 +1061,7 @@ void GtkNativePanelTesting::PressLeftMouseButtonTitlebar(
panel_gtk_->OnTitlebarButtonPressEvent(
NULL, reinterpret_cast<GdkEventButton*>(event));
gdk_event_free(event);
- MessageLoopForUI::current()->RunUntilIdle();
+ base::MessageLoopForUI::current()->RunUntilIdle();
}
void GtkNativePanelTesting::ReleaseMouseButtonTitlebar(
@@ -1078,7 +1078,7 @@ void GtkNativePanelTesting::ReleaseMouseButtonTitlebar(
NULL, reinterpret_cast<GdkEventButton*>(event));
}
gdk_event_free(event);
- MessageLoopForUI::current()->RunUntilIdle();
+ base::MessageLoopForUI::current()->RunUntilIdle();
}
void GtkNativePanelTesting::DragTitlebar(const gfx::Point& mouse_location) {
@@ -1090,14 +1090,14 @@ void GtkNativePanelTesting::DragTitlebar(const gfx::Point& mouse_location) {
panel_gtk_->drag_helper_->OnMouseMoveEvent(
NULL, reinterpret_cast<GdkEventMotion*>(event));
gdk_event_free(event);
- MessageLoopForUI::current()->RunUntilIdle();
+ base::MessageLoopForUI::current()->RunUntilIdle();
}
void GtkNativePanelTesting::CancelDragTitlebar() {
if (!panel_gtk_->drag_helper_.get())
return;
panel_gtk_->drag_helper_->OnGrabBrokenEvent(NULL, NULL);
- MessageLoopForUI::current()->RunUntilIdle();
+ base::MessageLoopForUI::current()->RunUntilIdle();
}
void GtkNativePanelTesting::FinishDragTitlebar() {
diff --git a/chrome/browser/ui/gtk/process_singleton_dialog.cc b/chrome/browser/ui/gtk/process_singleton_dialog.cc
index 53f4db0..85168bc 100644
--- a/chrome/browser/ui/gtk/process_singleton_dialog.cc
+++ b/chrome/browser/ui/gtk/process_singleton_dialog.cc
@@ -33,10 +33,10 @@ ProcessSingletonDialog::ProcessSingletonDialog(const std::string& message) {
g_signal_connect(dialog_, "response", G_CALLBACK(OnResponseThunk), this);
gtk_widget_show_all(dialog_);
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
}
void ProcessSingletonDialog::OnResponse(GtkWidget* dialog, int response_id) {
gtk_widget_destroy(dialog_);
- MessageLoop::current()->Quit();
+ base::MessageLoop::current()->Quit();
}
diff --git a/chrome/browser/ui/gtk/protocol_dialog_gtk.cc b/chrome/browser/ui/gtk/protocol_dialog_gtk.cc
index 3ff190d..468e16d 100644
--- a/chrome/browser/ui/gtk/protocol_dialog_gtk.cc
+++ b/chrome/browser/ui/gtk/protocol_dialog_gtk.cc
@@ -42,7 +42,7 @@ ProtocolDialogGtk::ProtocolDialogGtk(
scoped_ptr<const ProtocolDialogDelegate> delegate)
: delegate_(delegate.Pass()),
creation_time_(base::TimeTicks::Now()) {
- DCHECK_EQ(MessageLoop::TYPE_UI, MessageLoop::current()->type());
+ DCHECK_EQ(base::MessageLoop::TYPE_UI, base::MessageLoop::current()->type());
dialog_ = gtk_dialog_new_with_buttons(
UTF16ToUTF8(delegate_->GetTitleText()).c_str(),
diff --git a/chrome/browser/ui/gtk/reload_button_gtk.cc b/chrome/browser/ui/gtk/reload_button_gtk.cc
index 2425931..bd26518 100644
--- a/chrome/browser/ui/gtk/reload_button_gtk.cc
+++ b/chrome/browser/ui/gtk/reload_button_gtk.cc
@@ -311,7 +311,7 @@ gboolean ReloadButtonGtk::OnButtonPress(GtkWidget* widget,
return FALSE;
y_position_of_last_press_ = static_cast<int>(event->y);
- MessageLoop::current()->PostDelayedTask(
+ base::MessageLoop::current()->PostDelayedTask(
FROM_HERE,
base::Bind(&ReloadButtonGtk::ShowReloadMenu,
weak_factory_.GetWeakPtr(),
diff --git a/chrome/browser/ui/gtk/reload_button_gtk_unittest.cc b/chrome/browser/ui/gtk/reload_button_gtk_unittest.cc
index f096bdb..a395a4e 100644
--- a/chrome/browser/ui/gtk/reload_button_gtk_unittest.cc
+++ b/chrome/browser/ui/gtk/reload_button_gtk_unittest.cc
@@ -25,7 +25,7 @@ class ReloadButtonGtkTest : public testing::Test {
protected:
// We need a message loop for the timers to post events.
- MessageLoop loop_;
+ base::MessageLoop loop_;
ReloadButtonGtk reload_;
};
diff --git a/chrome/browser/ui/gtk/simple_message_box_gtk.cc b/chrome/browser/ui/gtk/simple_message_box_gtk.cc
index 3ce0150..1c1b82d 100644
--- a/chrome/browser/ui/gtk/simple_message_box_gtk.cc
+++ b/chrome/browser/ui/gtk/simple_message_box_gtk.cc
@@ -36,7 +36,7 @@ int g_dialog_response;
void OnDialogResponse(GtkWidget* widget, int response, void* user_data) {
g_dialog_response = response;
gtk_widget_destroy(widget);
- MessageLoop::current()->QuitNow();
+ base::MessageLoop::current()->QuitNow();
}
} // namespace
@@ -74,9 +74,9 @@ MessageBoxResult ShowMessageBox(gfx::NativeWindow parent,
g_signal_connect(dialog, "response", G_CALLBACK(OnDialogResponse), NULL);
gtk_util::ShowDialog(dialog);
// Not gtk_dialog_run as it prevents timers from running in the unit tests.
- MessageLoop::current()->Run();
- return g_dialog_response == GTK_RESPONSE_YES ?
- MESSAGE_BOX_RESULT_YES : MESSAGE_BOX_RESULT_NO;
+ base::MessageLoop::current()->Run();
+ return g_dialog_response == GTK_RESPONSE_YES ? MESSAGE_BOX_RESULT_YES
+ : MESSAGE_BOX_RESULT_NO;
}
gtk_dialog_set_default_response(GTK_DIALOG(dialog), GTK_RESPONSE_OK);
diff --git a/chrome/browser/ui/gtk/tabs/tab_gtk.cc b/chrome/browser/ui/gtk/tabs/tab_gtk.cc
index c145ff2..94eae7c 100644
--- a/chrome/browser/ui/gtk/tabs/tab_gtk.cc
+++ b/chrome/browser/ui/gtk/tabs/tab_gtk.cc
@@ -42,11 +42,11 @@ class TabGtk::TabGtkObserverHelper {
public:
explicit TabGtkObserverHelper(TabGtk* tab)
: tab_(tab) {
- MessageLoopForUI::current()->AddObserver(tab_);
+ base::MessageLoopForUI::current()->AddObserver(tab_);
}
~TabGtkObserverHelper() {
- MessageLoopForUI::current()->RemoveObserver(tab_);
+ base::MessageLoopForUI::current()->RemoveObserver(tab_);
}
private:
@@ -197,7 +197,7 @@ gboolean TabGtk::OnDragButtonReleased(GtkWidget* widget,
// get a follow up event to tell us the drag has finished (either a
// drag-failed or a drag-end). So we post a task to manually end the drag.
// If GTK+ does send the drag-failed or drag-end event, we cancel the task.
- MessageLoop::current()->PostTask(
+ base::MessageLoop::current()->PostTask(
FROM_HERE,
base::Bind(&TabGtk::EndDrag, drag_end_factory_.GetWeakPtr(), false));
return TRUE;
@@ -349,7 +349,7 @@ void TabGtk::EndDrag(bool canceled) {
// We must let gtk clean up after we handle the drag operation, otherwise
// there will be outstanding references to the drag widget when we try to
// destroy it.
- MessageLoop::current()->PostTask(
+ base::MessageLoop::current()->PostTask(
FROM_HERE,
base::Bind(&TabGtk::DestroyDragWidget, destroy_factory_.GetWeakPtr()));
diff --git a/chrome/browser/ui/gtk/tabs/tab_gtk.h b/chrome/browser/ui/gtk/tabs/tab_gtk.h
index 2af671d..1f1ff47 100644
--- a/chrome/browser/ui/gtk/tabs/tab_gtk.h
+++ b/chrome/browser/ui/gtk/tabs/tab_gtk.h
@@ -16,8 +16,7 @@
class TabStripMenuController;
class ThemeService;
-class TabGtk : public TabRendererGtk,
- public MessageLoopForUI::Observer {
+class TabGtk : public TabRendererGtk, public base::MessageLoopForUI::Observer {
public:
// An interface implemented by an object that can help this Tab complete
// various actions. The index parameter is the index of this Tab in the
diff --git a/chrome/browser/ui/gtk/tabs/tab_strip_gtk.cc b/chrome/browser/ui/gtk/tabs/tab_strip_gtk.cc
index 4c821f0..d86364d 100644
--- a/chrome/browser/ui/gtk/tabs/tab_strip_gtk.cc
+++ b/chrome/browser/ui/gtk/tabs/tab_strip_gtk.cc
@@ -915,7 +915,7 @@ void TabStripGtk::DestroyDraggedTab(TabGtk* tab) {
gtk_container_remove(GTK_CONTAINER(tabstrip_.get()), tab->widget());
// If we delete the dragged source tab here, the DestroyDragWidget posted
// task will be run after the tab is deleted, leading to a crash.
- MessageLoop::current()->DeleteSoon(FROM_HERE, tab);
+ base::MessageLoop::current()->DeleteSoon(FROM_HERE, tab);
// Force a layout here, because if we've just quickly drag detached a Tab,
// the stopping of the active animation above may have left the TabStrip in a
@@ -1417,7 +1417,7 @@ void TabStripGtk::HandleGlobalMouseMoveEvent() {
// Mouse moved outside the tab slop zone, start a timer to do a resize
// layout after a short while...
if (!weak_factory_.HasWeakPtrs()) {
- MessageLoop::current()->PostDelayedTask(
+ base::MessageLoop::current()->PostDelayedTask(
FROM_HERE,
base::Bind(&TabStripGtk::ResizeLayoutTabs,
weak_factory_.GetWeakPtr()),
@@ -1655,14 +1655,14 @@ void TabStripGtk::ReStack() {
void TabStripGtk::AddMessageLoopObserver() {
if (!added_as_message_loop_observer_) {
- MessageLoopForUI::current()->AddObserver(this);
+ base::MessageLoopForUI::current()->AddObserver(this);
added_as_message_loop_observer_ = true;
}
}
void TabStripGtk::RemoveMessageLoopObserver() {
if (added_as_message_loop_observer_) {
- MessageLoopForUI::current()->RemoveObserver(this);
+ base::MessageLoopForUI::current()->RemoveObserver(this);
added_as_message_loop_observer_ = false;
}
}
@@ -2125,7 +2125,7 @@ void TabStripGtk::OnSizeAllocate(GtkWidget* widget, GtkAllocation* allocation) {
if (GetTabCount() == 1) {
Layout();
} else if (!layout_factory_.HasWeakPtrs()) {
- MessageLoop::current()->PostDelayedTask(
+ base::MessageLoop::current()->PostDelayedTask(
FROM_HERE,
base::Bind(&TabStripGtk::Layout, layout_factory_.GetWeakPtr()),
base::TimeDelta::FromMilliseconds(kLayoutAfterSizeAllocateMs));
diff --git a/chrome/browser/ui/gtk/tabs/tab_strip_gtk.h b/chrome/browser/ui/gtk/tabs/tab_strip_gtk.h
index a02c35d..15ced8c 100644
--- a/chrome/browser/ui/gtk/tabs/tab_strip_gtk.h
+++ b/chrome/browser/ui/gtk/tabs/tab_strip_gtk.h
@@ -34,7 +34,7 @@ class Image;
class TabStripGtk : public TabStripModelObserver,
public TabGtk::TabDelegate,
- public MessageLoopForUI::Observer,
+ public base::MessageLoopForUI::Observer,
public content::NotificationObserver,
public TabstripOriginProvider,
public ViewIDUtil::Delegate {
diff --git a/chrome/browser/ui/gtk/website_settings/website_settings_popup_gtk.cc b/chrome/browser/ui/gtk/website_settings/website_settings_popup_gtk.cc
index 0ad3513..10e6e5a 100644
--- a/chrome/browser/ui/gtk/website_settings/website_settings_popup_gtk.cc
+++ b/chrome/browser/ui/gtk/website_settings/website_settings_popup_gtk.cc
@@ -270,7 +270,7 @@ void WebsiteSettingsPopupGtk::BubbleClosing(BubbleGtk* bubble,
// Slightly delay destruction to allow the event stack to unwind and release
// references to owned widgets.
- MessageLoop::current()->DeleteSoon(FROM_HERE, this);
+ base::MessageLoop::current()->DeleteSoon(FROM_HERE, this);
}
void WebsiteSettingsPopupGtk::InitContents() {
diff --git a/chrome/browser/ui/omnibox/action_box_browsertest.cc b/chrome/browser/ui/omnibox/action_box_browsertest.cc
index 9bbe16e..a9a2009 100644
--- a/chrome/browser/ui/omnibox/action_box_browsertest.cc
+++ b/chrome/browser/ui/omnibox/action_box_browsertest.cc
@@ -60,7 +60,7 @@ class ActionBoxTest : public InProcessBrowserTest,
default:
FAIL() << "Unexpected notification type";
}
- MessageLoop::current()->Quit();
+ base::MessageLoop::current()->Quit();
}
DISALLOW_COPY_AND_ASSIGN(ActionBoxTest);
diff --git a/chrome/browser/ui/omnibox/omnibox_view_browsertest.cc b/chrome/browser/ui/omnibox/omnibox_view_browsertest.cc
index 9a0c7e6..9a259e6 100644
--- a/chrome/browser/ui/omnibox/omnibox_view_browsertest.cc
+++ b/chrome/browser/ui/omnibox/omnibox_view_browsertest.cc
@@ -378,7 +378,7 @@ class OmniboxViewTest : public InProcessBrowserTest,
default:
FAIL() << "Unexpected notification type";
}
- MessageLoop::current()->Quit();
+ base::MessageLoop::current()->Quit();
}
void BrowserAcceleratorsTest() {
diff --git a/chrome/browser/ui/omnibox/omnibox_view_unittest.cc b/chrome/browser/ui/omnibox/omnibox_view_unittest.cc
index 59bccf4..43351ad 100644
--- a/chrome/browser/ui/omnibox/omnibox_view_unittest.cc
+++ b/chrome/browser/ui/omnibox/omnibox_view_unittest.cc
@@ -22,7 +22,7 @@ class OmniboxViewTest : public PlatformTest {
private:
// Windows requires a message loop for clipboard access.
- MessageLoopForUI message_loop_;
+ base::MessageLoopForUI message_loop_;
};
TEST_F(OmniboxViewTest, TestStripSchemasUnsafeForPaste) {
diff --git a/chrome/browser/ui/panels/base_panel_browser_test.cc b/chrome/browser/ui/panels/base_panel_browser_test.cc
index 5c5a5b5..a24e2ef 100644
--- a/chrome/browser/ui/panels/base_panel_browser_test.cc
+++ b/chrome/browser/ui/panels/base_panel_browser_test.cc
@@ -366,7 +366,7 @@ Panel* BasePanelBrowserTest::CreatePanelWithParams(
}
if (params.wait_for_fully_created) {
- MessageLoopForUI::current()->RunUntilIdle();
+ base::MessageLoopForUI::current()->RunUntilIdle();
#if defined(OS_LINUX)
// On bots, we might have a simple window manager which always activates new
diff --git a/chrome/browser/ui/panels/docked_panel_collection.cc b/chrome/browser/ui/panels/docked_panel_collection.cc
index daed3f6..f17549f 100644
--- a/chrome/browser/ui/panels/docked_panel_collection.cc
+++ b/chrome/browser/ui/panels/docked_panel_collection.cc
@@ -554,7 +554,7 @@ void DockedPanelCollection::BringUpOrDownTitlebars(bool bring_up) {
// should always 'reset' the delays so cancel any tasks that haven't run yet
// and post a new one.
titlebar_action_factory_.InvalidateWeakPtrs();
- MessageLoop::current()->PostDelayedTask(
+ base::MessageLoop::current()->PostDelayedTask(
FROM_HERE,
base::Bind(&DockedPanelCollection::DelayedBringUpOrDownTitlebarsCheck,
titlebar_action_factory_.GetWeakPtr()),
@@ -769,7 +769,8 @@ void DockedPanelCollection::UpdatePanelOnCollectionChange(Panel* panel) {
void DockedPanelCollection::ScheduleLayoutRefresh() {
refresh_action_factory_.InvalidateWeakPtrs();
- MessageLoop::current()->PostDelayedTask(FROM_HERE,
+ base::MessageLoop::current()->PostDelayedTask(
+ FROM_HERE,
base::Bind(&DockedPanelCollection::RefreshLayout,
refresh_action_factory_.GetWeakPtr()),
base::TimeDelta::FromMilliseconds(PanelManager::AdjustTimeInterval(
diff --git a/chrome/browser/ui/panels/panel_browsertest.cc b/chrome/browser/ui/panels/panel_browsertest.cc
index e11d609..13c93b4 100644
--- a/chrome/browser/ui/panels/panel_browsertest.cc
+++ b/chrome/browser/ui/panels/panel_browsertest.cc
@@ -276,7 +276,7 @@ IN_PROC_BROWSER_TEST_F(PanelBrowserTest, CheckDockedPanelProperties) {
// Ensure that the layout message can get a chance to be processed so that
// the button visibility can be updated.
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(3, panel_manager->num_panels());
EXPECT_TRUE(docked_collection->HasPanel(panel1));
@@ -914,7 +914,7 @@ IN_PROC_BROWSER_TEST_F(PanelBrowserTest, ChangeAutoHideTaskBarThickness) {
mock_display_settings_provider()->SetDesktopBarThickness(
DisplaySettingsProvider::DESKTOP_BAR_ALIGNED_RIGHT,
right_bar_thickness);
- MessageLoopForUI::current()->RunUntilIdle();
+ base::MessageLoopForUI::current()->RunUntilIdle();
EXPECT_EQ(initial_starting_right_position,
docked_collection->StartingRightPosition());
EXPECT_EQ(docked_collection->work_area().bottom() - bottom_bar_thickness,
@@ -933,7 +933,7 @@ IN_PROC_BROWSER_TEST_F(PanelBrowserTest, ChangeAutoHideTaskBarThickness) {
mock_display_settings_provider()->SetDesktopBarThickness(
DisplaySettingsProvider::DESKTOP_BAR_ALIGNED_RIGHT,
right_bar_thickness);
- MessageLoopForUI::current()->RunUntilIdle();
+ base::MessageLoopForUI::current()->RunUntilIdle();
EXPECT_EQ(docked_collection->StartingRightPosition(),
initial_starting_right_position);
EXPECT_EQ(docked_collection->work_area().bottom() - bottom_bar_thickness,
@@ -1421,12 +1421,12 @@ IN_PROC_BROWSER_TEST_F(PanelBrowserTest,
WaitForPanelActiveState(panel1, SHOW_AS_ACTIVE);
panel1->SetExpansionState(Panel::MINIMIZED);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
WaitForPanelActiveState(panel1, SHOW_AS_INACTIVE);
EXPECT_EQ(Panel::MINIMIZED, panel1->expansion_state());
panel2->SetExpansionState(Panel::MINIMIZED);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
WaitForPanelActiveState(panel2, SHOW_AS_INACTIVE);
EXPECT_EQ(Panel::MINIMIZED, panel2->expansion_state());
diff --git a/chrome/browser/ui/panels/panel_drag_browsertest.cc b/chrome/browser/ui/panels/panel_drag_browsertest.cc
index eb443a2..08a87ab 100644
--- a/chrome/browser/ui/panels/panel_drag_browsertest.cc
+++ b/chrome/browser/ui/panels/panel_drag_browsertest.cc
@@ -1423,7 +1423,7 @@ IN_PROC_BROWSER_TEST_F(PanelDragBrowserTest, MAYBE_AttachWithSqueeze) {
EXPECT_EQ(detached_position2, panel2->GetBounds().origin());
// Wait for active states to settle.
- MessageLoopForUI::current()->RunUntilIdle();
+ base::MessageLoopForUI::current()->RunUntilIdle();
// Panel positions should have shifted because of the "squeeze" mode.
EXPECT_NE(docked_position4, panel4->GetBounds().origin());
diff --git a/chrome/browser/ui/panels/panel_host.cc b/chrome/browser/ui/panels/panel_host.cc
index 3044c2bd..658d930 100644
--- a/chrome/browser/ui/panels/panel_host.cc
+++ b/chrome/browser/ui/panels/panel_host.cc
@@ -204,7 +204,7 @@ void PanelHost::WebContentsDestroyed(content::WebContents* web_contents) {
// Close the panel after we return to the message loop (not immediately,
// otherwise, it may destroy this object before the stack has a chance
// to cleanly unwind.)
- MessageLoop::current()->PostTask(
+ base::MessageLoop::current()->PostTask(
FROM_HERE,
base::Bind(&PanelHost::ClosePanel, weak_factory_.GetWeakPtr()));
}
diff --git a/chrome/browser/ui/panels/panel_mouse_watcher_unittest.cc b/chrome/browser/ui/panels/panel_mouse_watcher_unittest.cc
index be817f5..c344960 100644
--- a/chrome/browser/ui/panels/panel_mouse_watcher_unittest.cc
+++ b/chrome/browser/ui/panels/panel_mouse_watcher_unittest.cc
@@ -23,7 +23,7 @@ class PanelMouseWatcherTest : public testing::Test {
};
TEST_F(PanelMouseWatcherTest, StartStopWatching) {
- MessageLoop loop(MessageLoop::TYPE_UI);
+ base::MessageLoop loop(base::MessageLoop::TYPE_UI);
scoped_ptr<PanelMouseWatcher> watcher(PanelMouseWatcher::Create());
EXPECT_FALSE(watcher->IsActive());
diff --git a/chrome/browser/ui/pdf/pdf_browsertest.cc b/chrome/browser/ui/pdf/pdf_browsertest.cc
index f73fefb..6dcf680 100644
--- a/chrome/browser/ui/pdf/pdf_browsertest.cc
+++ b/chrome/browser/ui/pdf/pdf_browsertest.cc
@@ -122,7 +122,7 @@ class PDFBrowserTest : public InProcessBrowserTest,
private:
void GetSnapshotFromRendererCallback(bool success,
const SkBitmap& bitmap) {
- MessageLoopForUI::current()->Quit();
+ base::MessageLoopForUI::current()->Quit();
ASSERT_EQ(success, true);
base::FilePath reference = ui_test_utils::GetTestFilePath(
GetPDFTestDir(),
diff --git a/chrome/browser/ui/search/instant_controller.cc b/chrome/browser/ui/search/instant_controller.cc
index 02ba4d3..d1a2dfc 100644
--- a/chrome/browser/ui/search/instant_controller.cc
+++ b/chrome/browser/ui/search/instant_controller.cc
@@ -232,7 +232,7 @@ void DeletePageSoon(scoped_ptr<T> page) {
if (page->contents())
page->ReleaseContents();
- MessageLoop::current()->DeleteSoon(FROM_HERE, page.release());
+ base::MessageLoop::current()->DeleteSoon(FROM_HERE, page.release());
}
} // namespace
@@ -1180,7 +1180,8 @@ void InstantController::InstantSupportDetermined(
bool supports_instant) {
if (IsContentsFrom(instant_tab(), contents)) {
if (!supports_instant)
- MessageLoop::current()->DeleteSoon(FROM_HERE, instant_tab_.release());
+ base::MessageLoop::current()->DeleteSoon(FROM_HERE,
+ instant_tab_.release());
content::NotificationService::current()->Notify(
chrome::NOTIFICATION_INSTANT_TAB_SUPPORT_DETERMINED,
diff --git a/chrome/browser/ui/search/instant_extended_interactive_uitest.cc b/chrome/browser/ui/search/instant_extended_interactive_uitest.cc
index 6ec822a..053cab6 100644
--- a/chrome/browser/ui/search/instant_extended_interactive_uitest.cc
+++ b/chrome/browser/ui/search/instant_extended_interactive_uitest.cc
@@ -93,7 +93,7 @@ class QuittingHistoryDBTask : public history::HistoryDBTask {
}
virtual void DoneRunOnMainThread() OVERRIDE {
- MessageLoop::current()->Quit();
+ base::MessageLoop::current()->Quit();
}
private:
@@ -199,11 +199,11 @@ class InstantExtendedTest : public InProcessBrowserTest,
HistoryService* history = HistoryServiceFactory::GetForProfile(
browser()->profile(), Profile::EXPLICIT_ACCESS);
DCHECK(history);
- DCHECK(MessageLoop::current());
+ DCHECK(base::MessageLoop::current());
CancelableRequestConsumer consumer;
history->ScheduleDBTask(new QuittingHistoryDBTask(), &consumer);
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
}
int CountSearchProviderSuggestions() {
diff --git a/chrome/browser/ui/search/instant_unload_handler.cc b/chrome/browser/ui/search/instant_unload_handler.cc
index 4c9ff71..8f82a08 100644
--- a/chrome/browser/ui/search/instant_unload_handler.cc
+++ b/chrome/browser/ui/search/instant_unload_handler.cc
@@ -72,7 +72,7 @@ void InstantUnloadHandler::RunUnloadListenersOrDestroy(
// get here from BrowserInstantController::TabDeactivated, other tab
// observers may still expect to interact with the tab before the event has
// finished propagating.
- MessageLoop::current()->DeleteSoon(FROM_HERE, contents.release());
+ base::MessageLoop::current()->DeleteSoon(FROM_HERE, contents.release());
return;
}
@@ -102,5 +102,5 @@ void InstantUnloadHandler::Destroy(WebContentsDelegateImpl* delegate) {
// The delegate's method is a caller on the stack, so schedule the deletion
// for later.
delegates_.weak_erase(i);
- MessageLoop::current()->DeleteSoon(FROM_HERE, delegate);
+ base::MessageLoop::current()->DeleteSoon(FROM_HERE, delegate);
}
diff --git a/chrome/browser/ui/search_engines/keyword_editor_controller_unittest.cc b/chrome/browser/ui/search_engines/keyword_editor_controller_unittest.cc
index b9f2301..f1b1743 100644
--- a/chrome/browser/ui/search_engines/keyword_editor_controller_unittest.cc
+++ b/chrome/browser/ui/search_engines/keyword_editor_controller_unittest.cc
@@ -90,7 +90,7 @@ class KeywordEditorControllerTest : public testing::Test,
}
protected:
- MessageLoopForUI message_loop_;
+ base::MessageLoopForUI message_loop_;
scoped_ptr<TestingProfile> profile_;
scoped_ptr<KeywordEditorController> controller_;
TemplateURLService* model_;
diff --git a/chrome/browser/ui/startup/autolaunch_prompt_win.cc b/chrome/browser/ui/startup/autolaunch_prompt_win.cc
index 01130c2..5028fa0 100644
--- a/chrome/browser/ui/startup/autolaunch_prompt_win.cc
+++ b/chrome/browser/ui/startup/autolaunch_prompt_win.cc
@@ -98,7 +98,7 @@ AutolaunchInfoBarDelegate::AutolaunchInfoBarDelegate(
// We want the info-bar to stick-around for a few seconds and then be hidden
// on the next navigation after that.
- MessageLoop::current()->PostDelayedTask(
+ base::MessageLoop::current()->PostDelayedTask(
FROM_HERE,
base::Bind(&AutolaunchInfoBarDelegate::AllowExpiry,
weak_factory_.GetWeakPtr()),
diff --git a/chrome/browser/ui/startup/default_browser_prompt.cc b/chrome/browser/ui/startup/default_browser_prompt.cc
index e461a37..5ad07b0 100644
--- a/chrome/browser/ui/startup/default_browser_prompt.cc
+++ b/chrome/browser/ui/startup/default_browser_prompt.cc
@@ -123,9 +123,10 @@ DefaultBrowserInfoBarDelegate::DefaultBrowserInfoBarDelegate(
weak_factory_(this) {
// We want the info-bar to stick-around for few seconds and then be hidden
// on the next navigation after that.
- MessageLoop::current()->PostDelayedTask(
- FROM_HERE, base::Bind(&DefaultBrowserInfoBarDelegate::AllowExpiry,
- weak_factory_.GetWeakPtr()),
+ base::MessageLoop::current()->PostDelayedTask(
+ FROM_HERE,
+ base::Bind(&DefaultBrowserInfoBarDelegate::AllowExpiry,
+ weak_factory_.GetWeakPtr()),
base::TimeDelta::FromSeconds(8));
}
diff --git a/chrome/browser/ui/startup/startup_browser_creator_browsertest.cc b/chrome/browser/ui/startup/startup_browser_creator_browsertest.cc
index e82d2e4..05eb3a4 100644
--- a/chrome/browser/ui/startup/startup_browser_creator_browsertest.cc
+++ b/chrome/browser/ui/startup/startup_browser_creator_browsertest.cc
@@ -673,7 +673,7 @@ IN_PROC_BROWSER_TEST_F(StartupBrowserCreatorTest, UpdateWithTwoProfiles) {
while (SessionRestore::IsRestoring(profile1) ||
SessionRestore::IsRestoring(profile2))
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
// The startup URLs are ignored, and instead the last open sessions are
// restored.
@@ -766,7 +766,7 @@ IN_PROC_BROWSER_TEST_F(StartupBrowserCreatorTest,
SessionRestore::IsRestoring(profile_home2) ||
SessionRestore::IsRestoring(profile_last) ||
SessionRestore::IsRestoring(profile_urls))
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
Browser* new_browser = NULL;
// The last open profile (the profile_home1 in this case) will always be
diff --git a/chrome/browser/ui/startup/startup_browser_creator_interactive_uitest.cc b/chrome/browser/ui/startup/startup_browser_creator_interactive_uitest.cc
index bf3a31f..2fc1888 100644
--- a/chrome/browser/ui/startup/startup_browser_creator_interactive_uitest.cc
+++ b/chrome/browser/ui/startup/startup_browser_creator_interactive_uitest.cc
@@ -71,7 +71,7 @@ IN_PROC_BROWSER_TEST_F(StartupBrowserCreatorTest, LastUsedProfileActivated) {
last_opened_profiles, &return_code);
while (!browser_creator.ActivatedProfile())
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
Browser* new_browser = NULL;
diff --git a/chrome/browser/ui/sync/profile_signin_confirmation_helper_unittest.cc b/chrome/browser/ui/sync/profile_signin_confirmation_helper_unittest.cc
index 2117b99..8085ddc 100644
--- a/chrome/browser/ui/sync/profile_signin_confirmation_helper_unittest.cc
+++ b/chrome/browser/ui/sync/profile_signin_confirmation_helper_unittest.cc
@@ -153,11 +153,11 @@ class ProfileSigninConfirmationHelperTest : public testing::Test {
// TestExtensionSystem uses DeleteSoon, so we need to delete the profile
// and then run the message queue to clean up.
profile_.reset();
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
}
protected:
- MessageLoopForUI message_loop_;
+ base::MessageLoopForUI message_loop_;
content::TestBrowserThread ui_thread_;
scoped_ptr<TestingProfile> profile_;
TestingPrefStoreWithCustomReadError* user_prefs_;
diff --git a/chrome/browser/ui/tab_modal_confirm_dialog_browsertest.cc b/chrome/browser/ui/tab_modal_confirm_dialog_browsertest.cc
index 0d6c01e..58f8fe3 100644
--- a/chrome/browser/ui/tab_modal_confirm_dialog_browsertest.cc
+++ b/chrome/browser/ui/tab_modal_confirm_dialog_browsertest.cc
@@ -87,8 +87,8 @@ IN_PROC_BROWSER_TEST_F(TabModalConfirmDialogTest, CancelSelf) {
}
IN_PROC_BROWSER_TEST_F(TabModalConfirmDialogTest, Quit) {
- MessageLoopForUI::current()->PostTask(FROM_HERE,
- base::Bind(&chrome::AttemptExit));
+ base::MessageLoopForUI::current()->PostTask(FROM_HERE,
+ base::Bind(&chrome::AttemptExit));
content::RunMessageLoop();
EXPECT_EQ(0, accepted_count_);
EXPECT_EQ(1, canceled_count_);
diff --git a/chrome/browser/ui/tabs/hover_tab_selector.cc b/chrome/browser/ui/tabs/hover_tab_selector.cc
index 2949628..cfbf320 100644
--- a/chrome/browser/ui/tabs/hover_tab_selector.cc
+++ b/chrome/browser/ui/tabs/hover_tab_selector.cc
@@ -35,9 +35,10 @@ void HoverTabSelector::StartTabTransition(int index) {
const base::TimeDelta kHoverTransitionDelay =
base::TimeDelta::FromMilliseconds(500);
tab_transition_tab_index_ = index;
- MessageLoop::current()->PostDelayedTask(
- FROM_HERE, base::Bind(&HoverTabSelector::PerformTabTransition,
- weak_factory_.GetWeakPtr()),
+ base::MessageLoop::current()->PostDelayedTask(
+ FROM_HERE,
+ base::Bind(&HoverTabSelector::PerformTabTransition,
+ weak_factory_.GetWeakPtr()),
kHoverTransitionDelay);
}
}
diff --git a/chrome/browser/ui/tabs/tab_audio_indicator_unittest.cc b/chrome/browser/ui/tabs/tab_audio_indicator_unittest.cc
index cfe29fb..1e32d5c 100644
--- a/chrome/browser/ui/tabs/tab_audio_indicator_unittest.cc
+++ b/chrome/browser/ui/tabs/tab_audio_indicator_unittest.cc
@@ -22,7 +22,7 @@ class TabAudioIndicatorTest : public TabAudioIndicator::Delegate,
}
int schedule_paint_count_;
- MessageLoopForUI message_loop_; // Needed for ui::LinearAnimation.
+ base::MessageLoopForUI message_loop_; // Needed for ui::LinearAnimation.
private:
DISALLOW_COPY_AND_ASSIGN(TabAudioIndicatorTest);
diff --git a/chrome/browser/ui/toolbar/back_forward_menu_model_unittest.cc b/chrome/browser/ui/toolbar/back_forward_menu_model_unittest.cc
index c581fd3..c76eb6a 100644
--- a/chrome/browser/ui/toolbar/back_forward_menu_model_unittest.cc
+++ b/chrome/browser/ui/toolbar/back_forward_menu_model_unittest.cc
@@ -49,7 +49,7 @@ class FaviconDelegate : public ui::MenuModelDelegate {
virtual void OnIconChanged(int model_index) OVERRIDE {
was_called_ = true;
- MessageLoop::current()->Quit();
+ base::MessageLoop::current()->Quit();
}
bool was_called() const { return was_called_; }
@@ -544,7 +544,7 @@ TEST_F(BackFwdMenuModelTest, FaviconLoadTest) {
// Make the favicon service run GetFavIconForURL,
// FaviconDelegate.OnIconChanged will be called.
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
// Verify that the callback executed.
EXPECT_TRUE(favicon_delegate.was_called());
diff --git a/chrome/browser/ui/toolbar/encoding_menu_controller_unittest.cc b/chrome/browser/ui/toolbar/encoding_menu_controller_unittest.cc
index f71bf99..00fc182 100644
--- a/chrome/browser/ui/toolbar/encoding_menu_controller_unittest.cc
+++ b/chrome/browser/ui/toolbar/encoding_menu_controller_unittest.cc
@@ -23,7 +23,7 @@ class EncodingMenuControllerTest : public testing::Test {
EncodingMenuControllerTest()
: ui_thread_(BrowserThread::UI, &message_loop_) {}
private:
- MessageLoop message_loop_;
+ base::MessageLoop message_loop_;
content::TestBrowserThread ui_thread_;
};
diff --git a/chrome/browser/ui/toolbar/wrench_icon_painter_unittest.cc b/chrome/browser/ui/toolbar/wrench_icon_painter_unittest.cc
index da9ed2b..0dfdb25 100644
--- a/chrome/browser/ui/toolbar/wrench_icon_painter_unittest.cc
+++ b/chrome/browser/ui/toolbar/wrench_icon_painter_unittest.cc
@@ -23,7 +23,7 @@ class WrenchIconPainterTest : public testing::Test,
virtual void ScheduleWrenchIconPaint() OVERRIDE { ++schedule_paint_count_; }
protected:
- MessageLoopForUI message_loop_; // Needed for ui::Animation.
+ base::MessageLoopForUI message_loop_; // Needed for ui::Animation.
TestingProfile profile_;
int schedule_paint_count_;
ui::ThemeProvider* theme_provider_;
diff --git a/chrome/browser/ui/unload_controller.cc b/chrome/browser/ui/unload_controller.cc
index 8425a67..da61646 100644
--- a/chrome/browser/ui/unload_controller.cc
+++ b/chrome/browser/ui/unload_controller.cc
@@ -247,7 +247,7 @@ void UnloadController::ClearUnloadState(content::WebContents* web_contents,
if (process_now) {
ProcessPendingTabs();
} else {
- MessageLoop::current()->PostTask(
+ base::MessageLoop::current()->PostTask(
FROM_HERE,
base::Bind(&UnloadController::ProcessPendingTabs,
weak_factory_.GetWeakPtr()));
diff --git a/chrome/browser/ui/views/accessibility/accessibility_event_router_views.cc b/chrome/browser/ui/views/accessibility/accessibility_event_router_views.cc
index f38067f..1137d21 100644
--- a/chrome/browser/ui/views/accessibility/accessibility_event_router_views.cc
+++ b/chrome/browser/ui/views/accessibility/accessibility_event_router_views.cc
@@ -85,7 +85,7 @@ void AccessibilityEventRouterViews::HandleAccessibilityEvent(
views::ViewStorage* view_storage = views::ViewStorage::GetInstance();
int view_storage_id = view_storage->CreateStorageID();
view_storage->StoreView(view_storage_id, view);
- MessageLoop::current()->PostTask(
+ base::MessageLoop::current()->PostTask(
FROM_HERE,
base::Bind(
&AccessibilityEventRouterViews::DispatchNotificationOnViewStorageId,
diff --git a/chrome/browser/ui/views/accessibility/accessibility_event_router_views_unittest.cc b/chrome/browser/ui/views/accessibility/accessibility_event_router_views_unittest.cc
index 9211b26..3645408 100644
--- a/chrome/browser/ui/views/accessibility/accessibility_event_router_views_unittest.cc
+++ b/chrome/browser/ui/views/accessibility/accessibility_event_router_views_unittest.cc
@@ -131,7 +131,7 @@ class AccessibilityEventRouterViewsTest
// The Widget's FocusManager is deleted using DeleteSoon - this
// forces it to be deleted now, so we don't have any memory leaks
// when this method exits.
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
#if defined(OS_WIN)
ole_initializer_.reset();
@@ -179,7 +179,7 @@ class AccessibilityEventRouterViewsTest
last_control_context_ = info->context();
}
- MessageLoopForUI message_loop_;
+ base::MessageLoopForUI message_loop_;
int focus_event_count_;
std::string last_control_name_;
std::string last_control_context_;
@@ -232,19 +232,19 @@ TEST_F(AccessibilityEventRouterViewsTest, TestFocusNotification) {
views::FocusManager* focus_manager = contents->GetWidget()->GetFocusManager();
focus_event_count_ = 0;
focus_manager->AdvanceFocus(false);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(1, focus_event_count_);
EXPECT_EQ(kButton2ASCII, last_control_name_);
// Advance to button 3. Expect the new accessible name we assigned.
focus_manager->AdvanceFocus(false);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(2, focus_event_count_);
EXPECT_EQ(kButton3NewASCII, last_control_name_);
// Advance to button 1 and check the notification.
focus_manager->AdvanceFocus(false);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(3, focus_event_count_);
EXPECT_EQ(kButton1ASCII, last_control_name_);
@@ -273,7 +273,7 @@ TEST_F(AccessibilityEventRouterViewsTest, TestToolbarContext) {
focus_event_count_ = 0;
button->RequestFocus();
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
// Test that we got the event with the expected name and context.
EXPECT_EQ(kInitialFocusCount, focus_event_count_);
@@ -307,7 +307,7 @@ TEST_F(AccessibilityEventRouterViewsTest, TestAlertContext) {
focus_event_count_ = 0;
button->RequestFocus();
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
// Test that we got the event with the expected name and context.
EXPECT_EQ(kInitialFocusCount, focus_event_count_);
@@ -349,7 +349,7 @@ TEST_F(AccessibilityEventRouterViewsTest, StateChangeAfterNotification) {
// Process anything in the event loop. Now we should get the notification,
// and it should give us the new control name, not the old one.
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(kInitialFocusCount, focus_event_count_);
EXPECT_EQ(kNewNameASCII, last_control_name_);
@@ -387,7 +387,7 @@ TEST_F(AccessibilityEventRouterViewsTest, NotificationOnDeletedObject) {
// Process anything in the event loop. We shouldn't get a notification
// because the view is no longer valid, and this shouldn't crash.
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(0, focus_event_count_);
window->CloseNow();
diff --git a/chrome/browser/ui/views/app_list/app_list_controller_win.cc b/chrome/browser/ui/views/app_list/app_list_controller_win.cc
index 6b22f01..25684d5 100644
--- a/chrome/browser/ui/views/app_list/app_list_controller_win.cc
+++ b/chrome/browser/ui/views/app_list/app_list_controller_win.cc
@@ -1007,7 +1007,7 @@ void AppListController::Init(Profile* initial_profile) {
// Post a task to create the app list. This is posted to not impact startup
// time.
const int kInitWindowDelay = 5;
- MessageLoop::current()->PostDelayedTask(
+ base::MessageLoop::current()->PostDelayedTask(
FROM_HERE,
base::Bind(&::InitView, initial_profile),
base::TimeDelta::FromSeconds(kInitWindowDelay));
diff --git a/chrome/browser/ui/views/avatar_menu_button_browsertest.cc b/chrome/browser/ui/views/avatar_menu_button_browsertest.cc
index 498919c..6637cc3 100644
--- a/chrome/browser/ui/views/avatar_menu_button_browsertest.cc
+++ b/chrome/browser/ui/views/avatar_menu_button_browsertest.cc
@@ -46,7 +46,7 @@ IN_PROC_BROWSER_TEST_F(AvatarMenuButtonTest, HideOnSecondClick) {
// Verify that clicking once shows the avatar bubble.
static_cast<views::MenuButtonListener*>(button)->OnMenuButtonClicked(
NULL, gfx::Point());
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_TRUE(AvatarMenuBubbleView::IsShowing());
// Verify that clicking again doesn't reshow it.
@@ -55,7 +55,7 @@ IN_PROC_BROWSER_TEST_F(AvatarMenuButtonTest, HideOnSecondClick) {
// Hide the bubble manually. In the browser this would normally happen during
// the event processing.
AvatarMenuBubbleView::Hide();
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_FALSE(AvatarMenuBubbleView::IsShowing());
}
diff --git a/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc b/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc
index 75e7028..dd3e94f 100644
--- a/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc
+++ b/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc
@@ -1071,7 +1071,7 @@ void BookmarkBarView::BookmarkNodeChildrenReordered(BookmarkModel* model,
while (GetBookmarkButtonCount()) {
views::View* button = child_at(0);
RemoveChildView(button);
- MessageLoop::current()->DeleteSoon(FROM_HERE, button);
+ base::MessageLoop::current()->DeleteSoon(FROM_HERE, button);
}
// Create the new buttons.
@@ -1457,7 +1457,7 @@ void BookmarkBarView::BookmarkNodeRemovedImpl(BookmarkModel* model,
DCHECK(index >= 0 && index < GetBookmarkButtonCount());
views::View* button = child_at(index);
RemoveChildView(button);
- MessageLoop::current()->DeleteSoon(FROM_HERE, button);
+ base::MessageLoop::current()->DeleteSoon(FROM_HERE, button);
Layout();
SchedulePaint();
}
@@ -1518,7 +1518,7 @@ void BookmarkBarView::StartShowFolderDropMenuTimer(const BookmarkNode* node) {
return;
}
show_folder_method_factory_.InvalidateWeakPtrs();
- MessageLoop::current()->PostDelayedTask(
+ base::MessageLoop::current()->PostDelayedTask(
FROM_HERE,
base::Bind(&BookmarkBarView::ShowDropFolderForNode,
show_folder_method_factory_.GetWeakPtr(),
diff --git a/chrome/browser/ui/views/bookmarks/bookmark_bar_view_test.cc b/chrome/browser/ui/views/bookmarks/bookmark_bar_view_test.cc
index 6a9ac2f..8f135d9 100644
--- a/chrome/browser/ui/views/bookmarks/bookmark_bar_view_test.cc
+++ b/chrome/browser/ui/views/bookmarks/bookmark_bar_view_test.cc
@@ -108,8 +108,7 @@ class BookmarkBarViewEventTestBase : public ViewEventTestBase {
: ViewEventTestBase(),
model_(NULL),
bb_view_(NULL),
- file_thread_(BrowserThread::FILE, MessageLoop::current()) {
- }
+ file_thread_(BrowserThread::FILE, base::MessageLoop::current()) {}
virtual void SetUp() OVERRIDE {
views::MenuController::TurnOffContextMenuSelectionHoldForTest();
@@ -174,8 +173,9 @@ class BookmarkBarViewEventTestBase : public ViewEventTestBase {
profile_.reset();
// Run the message loop to ensure we delete allTasks and fully shut down.
- MessageLoop::current()->PostTask(FROM_HERE, MessageLoop::QuitClosure());
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->PostTask(FROM_HERE,
+ base::MessageLoop::QuitClosure());
+ base::MessageLoop::current()->Run();
ViewEventTestBase::TearDown();
BookmarkBarView::DisableAnimationsForTesting(false);
@@ -433,7 +433,7 @@ class ContextMenuNotificationObserver : public content::NotificationObserver {
virtual void Observe(int type,
const content::NotificationSource& source,
const content::NotificationDetails& details) OVERRIDE {
- MessageLoop::current()->PostTask(FROM_HERE, task_);
+ base::MessageLoop::current()->PostTask(FROM_HERE, task_);
}
// Sets the task that is posted when the context menu is shown.
@@ -866,7 +866,8 @@ class BookmarkBarViewTest9 : public BookmarkBarViewEventTestBase {
}
void Step3() {
- MessageLoop::current()->PostDelayedTask(FROM_HERE,
+ base::MessageLoop::current()->PostDelayedTask(
+ FROM_HERE,
base::Bind(&BookmarkBarViewTest9::Step4, this),
base::TimeDelta::FromMilliseconds(200));
}
@@ -882,9 +883,8 @@ class BookmarkBarViewTest9 : public BookmarkBarViewEventTestBase {
// On linux, Cancelling menu will call Quit on the message loop,
// which can interfere with Done. We need to run Done in the
// next execution loop.
- MessageLoop::current()->PostTask(
- FROM_HERE,
- base::Bind(&ViewEventTestBase::Done, this));
+ base::MessageLoop::current()->PostTask(
+ FROM_HERE, base::Bind(&ViewEventTestBase::Done, this));
}
int start_y_;
@@ -903,7 +903,7 @@ class BookmarkBarViewTest10 : public BookmarkBarViewEventTestBase {
ui_test_utils::MoveMouseToCenterAndPress(button, ui_controls::LEFT,
ui_controls::DOWN | ui_controls::UP,
CreateEventTask(this, &BookmarkBarViewTest10::Step2));
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
}
private:
@@ -1122,7 +1122,8 @@ class BookmarkBarViewTest12 : public BookmarkBarViewEventTestBase {
// Delay until we send tab, otherwise the message box doesn't appear
// correctly.
- MessageLoop::current()->PostDelayedTask(FROM_HERE,
+ base::MessageLoop::current()->PostDelayedTask(
+ FROM_HERE,
CreateEventTask(this, &BookmarkBarViewTest12::Step4),
base::TimeDelta::FromSeconds(1));
}
@@ -1133,7 +1134,8 @@ class BookmarkBarViewTest12 : public BookmarkBarViewEventTestBase {
window_->GetNativeWindow(), ui::VKEY_TAB, false, false, false, false);
// For some reason return isn't processed correctly unless we delay.
- MessageLoop::current()->PostDelayedTask(FROM_HERE,
+ base::MessageLoop::current()->PostDelayedTask(
+ FROM_HERE,
CreateEventTask(this, &BookmarkBarViewTest12::Step5),
base::TimeDelta::FromSeconds(1));
}
@@ -1147,7 +1149,7 @@ class BookmarkBarViewTest12 : public BookmarkBarViewEventTestBase {
void Step6() {
// Do a delayed task to give the dialog time to exit.
- MessageLoop::current()->PostTask(
+ base::MessageLoop::current()->PostTask(
FROM_HERE, CreateEventTask(this, &BookmarkBarViewTest12::Step7));
}
@@ -1386,7 +1388,7 @@ class BookmarkBarViewTest16 : public BookmarkBarViewEventTestBase {
window_->Close();
window_ = NULL;
- MessageLoop::current()->PostTask(
+ base::MessageLoop::current()->PostTask(
FROM_HERE, CreateEventTask(this, &BookmarkBarViewTest16::Done));
}
};
diff --git a/chrome/browser/ui/views/bookmarks/bookmark_context_menu_test.cc b/chrome/browser/ui/views/bookmarks/bookmark_context_menu_test.cc
index c028e75..47a240e 100644
--- a/chrome/browser/ui/views/bookmarks/bookmark_context_menu_test.cc
+++ b/chrome/browser/ui/views/bookmarks/bookmark_context_menu_test.cc
@@ -75,7 +75,7 @@ class BookmarkContextMenuTest : public testing::Test {
}
protected:
- MessageLoopForUI message_loop_;
+ base::MessageLoopForUI message_loop_;
content::TestBrowserThread ui_thread_;
content::TestBrowserThread file_thread_;
scoped_ptr<TestingProfile> profile_;
diff --git a/chrome/browser/ui/views/bookmarks/bookmark_drag_drop_views.cc b/chrome/browser/ui/views/bookmarks/bookmark_drag_drop_views.cc
index a4a7073..fb119cb 100644
--- a/chrome/browser/ui/views/bookmarks/bookmark_drag_drop_views.cc
+++ b/chrome/browser/ui/views/bookmarks/bookmark_drag_drop_views.cc
@@ -30,8 +30,8 @@ void DragBookmarks(Profile* profile,
drag_data.Write(profile, &data);
// Allow nested message loop so we get DnD events as we drag this around.
- bool was_nested = MessageLoop::current()->IsNested();
- MessageLoop::current()->SetNestableTasksAllowed(true);
+ bool was_nested = base::MessageLoop::current()->IsNested();
+ base::MessageLoop::current()->SetNestableTasksAllowed(true);
int operation = ui::DragDropTypes::DRAG_COPY |
ui::DragDropTypes::DRAG_MOVE |
@@ -48,7 +48,7 @@ void DragBookmarks(Profile* profile,
ui::DragDropTypes::DRAG_EVENT_SOURCE_MOUSE);
}
- MessageLoop::current()->SetNestableTasksAllowed(was_nested);
+ base::MessageLoop::current()->SetNestableTasksAllowed(was_nested);
}
int GetBookmarkDragOperation(content::BrowserContext* browser_context,
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 5337c97..8785e8f 100644
--- a/chrome/browser/ui/views/bookmarks/bookmark_editor_view_unittest.cc
+++ b/chrome/browser/ui/views/bookmarks/bookmark_editor_view_unittest.cc
@@ -107,7 +107,7 @@ class BookmarkEditorViewTest : public testing::Test {
views::TreeView* tree_view() { return editor_->tree_view_; }
- MessageLoopForUI message_loop_;
+ base::MessageLoopForUI message_loop_;
content::TestBrowserThread ui_thread_;
content::TestBrowserThread file_thread_;
diff --git a/chrome/browser/ui/views/browser_action_view.cc b/chrome/browser/ui/views/browser_action_view.cc
index 68dd81b..ebcb664 100644
--- a/chrome/browser/ui/views/browser_action_view.cc
+++ b/chrome/browser/ui/views/browser_action_view.cc
@@ -141,7 +141,7 @@ void BrowserActionButton::Destroy() {
if (context_menu_) {
context_menu_->Cancel();
- MessageLoop::current()->DeleteSoon(FROM_HERE, this);
+ base::MessageLoop::current()->DeleteSoon(FROM_HERE, this);
} else {
delete this;
}
diff --git a/chrome/browser/ui/views/browser_actions_container.cc b/chrome/browser/ui/views/browser_actions_container.cc
index 6e78773..88d8964 100644
--- a/chrome/browser/ui/views/browser_actions_container.cc
+++ b/chrome/browser/ui/views/browser_actions_container.cc
@@ -717,7 +717,7 @@ void BrowserActionsContainer::StopShowFolderDropMenuTimer() {
}
void BrowserActionsContainer::StartShowFolderDropMenuTimer() {
- MessageLoop::current()->PostDelayedTask(
+ base::MessageLoop::current()->PostDelayedTask(
FROM_HERE,
base::Bind(&BrowserActionsContainer::ShowDropFolder,
show_menu_task_factory_.GetWeakPtr()),
diff --git a/chrome/browser/ui/views/button_dropdown_test.cc b/chrome/browser/ui/views/button_dropdown_test.cc
index 524d217..62647ec 100644
--- a/chrome/browser/ui/views/button_dropdown_test.cc
+++ b/chrome/browser/ui/views/button_dropdown_test.cc
@@ -113,9 +113,8 @@ class ButtonDropDownDragTest : public ViewEventTestBase,
// One more hop is required because ui::SimpleMenuModel calls
// ui::SimpleMenuModel::Delegate::MenuClosed() via a posted
// task.
- MessageLoopForUI::current()->PostTask(
- FROM_HERE,
- CreateEventTask(this, &ButtonDropDownDragTest::Step5));
+ base::MessageLoopForUI::current()->PostTask(
+ FROM_HERE, CreateEventTask(this, &ButtonDropDownDragTest::Step5));
}
void Step5() {
diff --git a/chrome/browser/ui/views/chrome_to_mobile_bubble_view.cc b/chrome/browser/ui/views/chrome_to_mobile_bubble_view.cc
index 7327bce..3dd312a 100644
--- a/chrome/browser/ui/views/chrome_to_mobile_bubble_view.cc
+++ b/chrome/browser/ui/views/chrome_to_mobile_bubble_view.cc
@@ -171,7 +171,8 @@ void ChromeToMobileBubbleView::OnSendComplete(bool success) {
if (success) {
send_->SetText(l10n_util::GetStringUTF16(IDS_CHROME_TO_MOBILE_BUBBLE_SENT));
- MessageLoop::current()->PostDelayedTask(FROM_HERE,
+ base::MessageLoop::current()->PostDelayedTask(
+ FROM_HERE,
base::Bind(&ChromeToMobileBubbleView::Hide),
base::TimeDelta::FromSeconds(kAutoCloseDelay));
} else {
diff --git a/chrome/browser/ui/views/download/download_item_view.cc b/chrome/browser/ui/views/download/download_item_view.cc
index 5e5f1b7..3df4f15 100644
--- a/chrome/browser/ui/views/download/download_item_view.cc
+++ b/chrome/browser/ui/views/download/download_item_view.cc
@@ -315,10 +315,9 @@ void DownloadItemView::OnDownloadDestroyed(DownloadItem* download) {
void DownloadItemView::OnDownloadOpened(DownloadItem* download) {
disabled_while_opening_ = true;
SetEnabled(false);
- MessageLoop::current()->PostDelayedTask(
+ base::MessageLoop::current()->PostDelayedTask(
FROM_HERE,
- base::Bind(&DownloadItemView::Reenable,
- weak_ptr_factory_.GetWeakPtr()),
+ base::Bind(&DownloadItemView::Reenable, weak_ptr_factory_.GetWeakPtr()),
base::TimeDelta::FromMilliseconds(kDisabledOnOpenDuration));
// Notify our parent.
@@ -894,7 +893,7 @@ void DownloadItemView::ShowContextMenuImpl(const gfx::Point& p,
// Post a task to release the button. When we call the Run method on the menu
// below, it runs an inner message loop that might cause us to be deleted.
// Posting a task with a WeakPtr lets us safely handle the button release.
- MessageLoop::current()->PostNonNestableTask(
+ base::MessageLoop::current()->PostNonNestableTask(
FROM_HERE,
base::Bind(&DownloadItemView::ReleaseDropDown,
weak_ptr_factory_.GetWeakPtr()));
diff --git a/chrome/browser/ui/views/extensions/browser_action_overflow_menu_controller.cc b/chrome/browser/ui/views/extensions/browser_action_overflow_menu_controller.cc
index 887f13b..f767c99 100644
--- a/chrome/browser/ui/views/extensions/browser_action_overflow_menu_controller.cc
+++ b/chrome/browser/ui/views/extensions/browser_action_overflow_menu_controller.cc
@@ -80,7 +80,7 @@ bool BrowserActionOverflowMenuController::RunMenu(views::Widget* window,
if (!for_drop_) {
// Give the context menu (if any) a chance to execute the user-selected
// command.
- MessageLoop::current()->DeleteSoon(FROM_HERE, this);
+ base::MessageLoop::current()->DeleteSoon(FROM_HERE, this);
}
return true;
}
diff --git a/chrome/browser/ui/views/extensions/extension_installed_bubble.cc b/chrome/browser/ui/views/extensions/extension_installed_bubble.cc
index c1dca289..0384c9a 100644
--- a/chrome/browser/ui/views/extensions/extension_installed_bubble.cc
+++ b/chrome/browser/ui/views/extensions/extension_installed_bubble.cc
@@ -578,7 +578,7 @@ void ExtensionInstalledBubble::Observe(
if (extension == extension_) {
animation_wait_retries_ = 0;
// PostTask to ourself to allow all EXTENSION_LOADED Observers to run.
- MessageLoopForUI::current()->PostTask(
+ base::MessageLoopForUI::current()->PostTask(
FROM_HERE,
base::Bind(&ExtensionInstalledBubble::ShowInternal,
weak_factory_.GetWeakPtr()));
@@ -608,7 +608,7 @@ void ExtensionInstalledBubble::ShowInternal() {
animation_wait_retries_++ < kAnimationWaitMaxRetry) {
// We don't know where the view will be until the container has stopped
// animating, so check back in a little while.
- MessageLoopForUI::current()->PostDelayedTask(
+ base::MessageLoopForUI::current()->PostDelayedTask(
FROM_HERE,
base::Bind(&ExtensionInstalledBubble::ShowInternal,
weak_factory_.GetWeakPtr()),
diff --git a/chrome/browser/ui/views/external_tab_container_win.cc b/chrome/browser/ui/views/external_tab_container_win.cc
index 991ef1f..b9ec6a74 100644
--- a/chrome/browser/ui/views/external_tab_container_win.cc
+++ b/chrome/browser/ui/views/external_tab_container_win.cc
@@ -270,11 +270,12 @@ bool ExternalTabContainerWin::Init(Profile* profile,
// Start loading initial URL
if (!initial_url.is_empty()) {
// Navigate out of context since we don't have a 'tab_handle_' yet.
- MessageLoop::current()->PostTask(
+ base::MessageLoop::current()->PostTask(
FROM_HERE,
base::Bind(&ExternalTabContainerWin::Navigate,
weak_factory_.GetWeakPtr(),
- initial_url, referrer));
+ initial_url,
+ referrer));
}
// We need WS_POPUP to be on the window during initialization, but
@@ -360,9 +361,10 @@ bool ExternalTabContainerWin::Reinitialize(
automation_resource_message_filter_ = filter;
// Wait for the automation channel to be initialized before resuming pending
// render views and sending in the navigation state.
- MessageLoop::current()->PostTask(
- FROM_HERE, base::Bind(&ExternalTabContainerWin::OnReinitialize,
- weak_factory_.GetWeakPtr()));
+ base::MessageLoop::current()->PostTask(
+ FROM_HERE,
+ base::Bind(&ExternalTabContainerWin::OnReinitialize,
+ weak_factory_.GetWeakPtr()));
if (parent_window)
SetParent(views::HWNDForWidget(widget_), parent_window);
diff --git a/chrome/browser/ui/views/frame/browser_view.cc b/chrome/browser/ui/views/frame/browser_view.cc
index 1d931d8..0604615 100644
--- a/chrome/browser/ui/views/frame/browser_view.cc
+++ b/chrome/browser/ui/views/frame/browser_view.cc
@@ -1509,7 +1509,7 @@ bool BrowserView::CanActivate() const {
// has to be done in a post task, otherwise if the user clicked on a window
// that doesn't have the modal dialog the windows keep trying to get the focus
// from each other on Windows. http://crbug.com/141650.
- MessageLoop::current()->PostTask(
+ base::MessageLoop::current()->PostTask(
FROM_HERE,
base::Bind(&BrowserView::ActivateAppModalDialog,
activate_modal_dialog_factory_.GetWeakPtr()));
diff --git a/chrome/browser/ui/views/fullscreen_exit_bubble_views.cc b/chrome/browser/ui/views/fullscreen_exit_bubble_views.cc
index d9a84eb..bc80c86 100644
--- a/chrome/browser/ui/views/fullscreen_exit_bubble_views.cc
+++ b/chrome/browser/ui/views/fullscreen_exit_bubble_views.cc
@@ -322,7 +322,7 @@ FullscreenExitBubbleViews::~FullscreenExitBubbleViews() {
// the popup to synchronously hide, and then asynchronously close and delete
// itself.
popup_->Close();
- MessageLoop::current()->DeleteSoon(FROM_HERE, popup_);
+ base::MessageLoop::current()->DeleteSoon(FROM_HERE, popup_);
}
void FullscreenExitBubbleViews::UpdateContent(
diff --git a/chrome/browser/ui/views/importer/import_lock_dialog_view.cc b/chrome/browser/ui/views/importer/import_lock_dialog_view.cc
index 11f36a8..6c17958 100644
--- a/chrome/browser/ui/views/importer/import_lock_dialog_view.cc
+++ b/chrome/browser/ui/views/importer/import_lock_dialog_view.cc
@@ -86,13 +86,13 @@ string16 ImportLockDialogView::GetWindowTitle() const {
}
bool ImportLockDialogView::Accept() {
- MessageLoop::current()->PostTask(FROM_HERE,
- base::Bind(callback_, true));
+ base::MessageLoop::current()->PostTask(FROM_HERE,
+ base::Bind(callback_, true));
return true;
}
bool ImportLockDialogView::Cancel() {
- MessageLoop::current()->PostTask(FROM_HERE,
- base::Bind(callback_, false));
+ base::MessageLoop::current()->PostTask(FROM_HERE,
+ base::Bind(callback_, false));
return true;
}
diff --git a/chrome/browser/ui/views/infobars/infobar_container_view.cc b/chrome/browser/ui/views/infobars/infobar_container_view.cc
index 072b1c8..d277514 100644
--- a/chrome/browser/ui/views/infobars/infobar_container_view.cc
+++ b/chrome/browser/ui/views/infobars/infobar_container_view.cc
@@ -61,5 +61,5 @@ void InfoBarContainerView::PlatformSpecificAddInfoBar(InfoBar* infobar,
void InfoBarContainerView::PlatformSpecificRemoveInfoBar(InfoBar* infobar) {
RemoveChildView(static_cast<InfoBarView*>(infobar));
- MessageLoop::current()->DeleteSoon(FROM_HERE, infobar);
+ base::MessageLoop::current()->DeleteSoon(FROM_HERE, infobar);
}
diff --git a/chrome/browser/ui/views/keyboard_access_browsertest.cc b/chrome/browser/ui/views/keyboard_access_browsertest.cc
index 1b45c7e..06794b4 100644
--- a/chrome/browser/ui/views/keyboard_access_browsertest.cc
+++ b/chrome/browser/ui/views/keyboard_access_browsertest.cc
@@ -68,7 +68,8 @@ class ViewFocusChangeWaiter : public views::FocusChangeListener {
virtual void OnDidChangeFocus(views::View* focused_before,
views::View* focused_now) OVERRIDE {
if (focused_now && focused_now->id() != previous_view_id_) {
- MessageLoop::current()->PostTask(FROM_HERE, MessageLoop::QuitClosure());
+ base::MessageLoop::current()->PostTask(FROM_HERE,
+ base::MessageLoop::QuitClosure());
}
}
@@ -109,8 +110,9 @@ class SendKeysMenuListener : public views::MenuListener {
SendKeyPress(browser_, ui::VKEY_RETURN);
} else {
SendKeyPress(browser_, ui::VKEY_ESCAPE);
- MessageLoop::current()->PostDelayedTask(
- FROM_HERE, MessageLoop::QuitClosure(),
+ base::MessageLoop::current()->PostDelayedTask(
+ FROM_HERE,
+ base::MessageLoop::QuitClosure(),
base::TimeDelta::FromMilliseconds(200));
}
}
diff --git a/chrome/browser/ui/views/location_bar/star_view_browsertest.cc b/chrome/browser/ui/views/location_bar/star_view_browsertest.cc
index ea635fc..9cceab8 100644
--- a/chrome/browser/ui/views/location_bar/star_view_browsertest.cc
+++ b/chrome/browser/ui/views/location_bar/star_view_browsertest.cc
@@ -43,7 +43,7 @@ IN_PROC_BROWSER_TEST_F(StarViewTest, MAYBE_HideOnSecondClick) {
// Hide the bubble manually. In the browser this would normally happen during
// the event processing.
chrome::HideBookmarkBubbleView();
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_FALSE(chrome::IsBookmarkBubbleViewShowing());
star_view->OnMouseReleased(released_event);
EXPECT_FALSE(chrome::IsBookmarkBubbleViewShowing());
diff --git a/chrome/browser/ui/views/menu_model_adapter_test.cc b/chrome/browser/ui/views/menu_model_adapter_test.cc
index 3bb832d..c30f556 100644
--- a/chrome/browser/ui/views/menu_model_adapter_test.cc
+++ b/chrome/browser/ui/views/menu_model_adapter_test.cc
@@ -270,9 +270,8 @@ class MenuModelAdapterTest : public ViewEventTestBase,
menu_model_adapter_.BuildMenu(menu_);
- MessageLoopForUI::current()->PostTask(
- FROM_HERE,
- CreateEventTask(this, &MenuModelAdapterTest::Step3));
+ base::MessageLoopForUI::current()->PostTask(
+ FROM_HERE, CreateEventTask(this, &MenuModelAdapterTest::Step3));
}
// Verify that the submenu MenuModel received the close callback
diff --git a/chrome/browser/ui/views/message_center/web_notification_tray_win.cc b/chrome/browser/ui/views/message_center/web_notification_tray_win.cc
index 33c0cf6..c3bd8bf 100644
--- a/chrome/browser/ui/views/message_center/web_notification_tray_win.cc
+++ b/chrome/browser/ui/views/message_center/web_notification_tray_win.cc
@@ -204,7 +204,7 @@ void WebNotificationTrayWin::OnMessageCenterTrayChanged() {
// See the comments in ash/system/web_notification/web_notification_tray.cc
// for why PostTask.
should_update_tray_content_ = true;
- MessageLoop::current()->PostTask(
+ base::MessageLoop::current()->PostTask(
FROM_HERE,
base::Bind(&WebNotificationTrayWin::UpdateStatusIcon, AsWeakPtr()));
}
diff --git a/chrome/browser/ui/views/panels/panel_view.cc b/chrome/browser/ui/views/panels/panel_view.cc
index 905c18e..b2860f1 100644
--- a/chrome/browser/ui/views/panels/panel_view.cc
+++ b/chrome/browser/ui/views/panels/panel_view.cc
@@ -138,7 +138,7 @@ void NativePanelTestingWin::FinishDragTitlebar() {
}
bool NativePanelTestingWin::VerifyDrawingAttention() const {
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
return panel_view_->GetFrameView()->GetPaintState() ==
PanelFrameView::PAINT_FOR_ATTENTION;
}
diff --git a/chrome/browser/ui/views/reload_button_unittest.cc b/chrome/browser/ui/views/reload_button_unittest.cc
index 3db8488..9c24ae5 100644
--- a/chrome/browser/ui/views/reload_button_unittest.cc
+++ b/chrome/browser/ui/views/reload_button_unittest.cc
@@ -24,7 +24,7 @@ class ReloadButtonTest : public testing::Test {
protected:
// We need a message loop for the timers to post events.
- MessageLoop loop_;
+ base::MessageLoop loop_;
ReloadButton reload_;
};
diff --git a/chrome/browser/ui/views/select_file_dialog_extension.cc b/chrome/browser/ui/views/select_file_dialog_extension.cc
index 148ba6d..dbdac6d 100644
--- a/chrome/browser/ui/views/select_file_dialog_extension.cc
+++ b/chrome/browser/ui/views/select_file_dialog_extension.cc
@@ -150,11 +150,12 @@ void SelectFileDialogExtension::ExtensionTerminated(
// this time though this is broken because of some faulty wiring in
// ExtensionProcessManager::CreateViewHost. Once that is fixed, remove this.
if (profile_) {
- MessageLoop::current()->PostTask(FROM_HERE,
+ base::MessageLoop::current()->PostTask(
+ FROM_HERE,
base::Bind(&ExtensionService::ReloadExtension,
- base::Unretained(extensions::ExtensionSystem::Get(profile_)->
- extension_service()),
- extension_id));
+ base::Unretained(extensions::ExtensionSystem::Get(profile_)
+ ->extension_service()),
+ extension_id));
}
dialog->Close();
diff --git a/chrome/browser/ui/views/simple_message_box_views.cc b/chrome/browser/ui/views/simple_message_box_views.cc
index fcda39e..62b468e 100644
--- a/chrome/browser/ui/views/simple_message_box_views.cc
+++ b/chrome/browser/ui/views/simple_message_box_views.cc
@@ -33,7 +33,7 @@ namespace {
// destroyed before a box in an outer-loop. So to avoid this, ref-counting is
// used so that the SimpleMessageBoxViews gets deleted at the right time.
class SimpleMessageBoxViews : public views::DialogDelegate,
- public MessageLoop::Dispatcher,
+ public base::MessageLoop::Dispatcher,
public base::RefCounted<SimpleMessageBoxViews> {
public:
SimpleMessageBoxViews(const string16& title,
@@ -191,7 +191,8 @@ MessageBoxResult ShowMessageBox(gfx::NativeWindow parent,
RunWithDispatcher(dialog, anchor, true);
#else
{
- MessageLoop::ScopedNestableTaskAllower allow(MessageLoopForUI::current());
+ base::MessageLoop::ScopedNestableTaskAllower allow(
+ base::MessageLoopForUI::current());
base::RunLoop run_loop(dialog);
run_loop.Run();
}
diff --git a/chrome/browser/ui/views/status_bubble_views.cc b/chrome/browser/ui/views/status_bubble_views.cc
index 8fcda50..bb141ca 100644
--- a/chrome/browser/ui/views/status_bubble_views.cc
+++ b/chrome/browser/ui/views/status_bubble_views.cc
@@ -221,10 +221,10 @@ void StatusBubbleViews::StatusView::StartTimer(base::TimeDelta time) {
if (timer_factory_.HasWeakPtrs())
timer_factory_.InvalidateWeakPtrs();
- MessageLoop::current()->PostDelayedTask(
+ base::MessageLoop::current()->PostDelayedTask(
FROM_HERE,
base::Bind(&StatusBubbleViews::StatusView::OnTimer,
- timer_factory_.GetWeakPtr()),
+ timer_factory_.GetWeakPtr()),
time);
}
@@ -681,7 +681,7 @@ void StatusBubbleViews::SetURL(const GURL& url, const std::string& languages) {
if (is_expanded_ && !url.is_empty()) {
ExpandBubble();
} else if (net::FormatUrl(url, languages).length() > url_text_.length()) {
- MessageLoop::current()->PostDelayedTask(
+ base::MessageLoop::current()->PostDelayedTask(
FROM_HERE,
base::Bind(&StatusBubbleViews::ExpandBubble,
expand_timer_factory_.GetWeakPtr()),
diff --git a/chrome/browser/ui/views/sync/one_click_signin_bubble_view_browsertest.cc b/chrome/browser/ui/views/sync/one_click_signin_bubble_view_browsertest.cc
index 4700166..a2ed79f 100644
--- a/chrome/browser/ui/views/sync/one_click_signin_bubble_view_browsertest.cc
+++ b/chrome/browser/ui/views/sync/one_click_signin_bubble_view_browsertest.cc
@@ -31,7 +31,7 @@ class OneClickSigninBubbleViewBrowserTest : public InProcessBrowserTest {
OneClickSigninBubbleView* view =
OneClickSigninBubbleView::view_for_testing();
EXPECT_TRUE(view != NULL);
- view->message_loop_for_testing_ = MessageLoop::current();
+ view->message_loop_for_testing_ = base::MessageLoop::current();
return view;
}
diff --git a/chrome/browser/ui/views/tab_contents/chrome_web_contents_view_delegate_views.cc b/chrome/browser/ui/views/tab_contents/chrome_web_contents_view_delegate_views.cc
index 3de1353..55e1db7 100644
--- a/chrome/browser/ui/views/tab_contents/chrome_web_contents_view_delegate_views.cc
+++ b/chrome/browser/ui/views/tab_contents/chrome_web_contents_view_delegate_views.cc
@@ -162,7 +162,8 @@ void ChromeWebContentsViewDelegateViews::ShowContextMenu(
// Enable recursive tasks on the message loop so we can get updates while
// the context menu is being displayed.
- MessageLoop::ScopedNestableTaskAllower allow(MessageLoop::current());
+ base::MessageLoop::ScopedNestableTaskAllower allow(
+ base::MessageLoop::current());
context_menu_->RunMenuAt(top_level_widget, screen_point, type);
}
diff --git a/chrome/browser/ui/views/tabs/tab_drag_controller.cc b/chrome/browser/ui/views/tabs/tab_drag_controller.cc
index 980e315..5c2067a 100644
--- a/chrome/browser/ui/views/tabs/tab_drag_controller.cc
+++ b/chrome/browser/ui/views/tabs/tab_drag_controller.cc
@@ -403,7 +403,7 @@ TabDragController::~TabDragController() {
if (source_tabstrip_ && detach_into_browser_)
GetModel(source_tabstrip_)->RemoveObserver(this);
- MessageLoopForUI::current()->RemoveObserver(this);
+ base::MessageLoopForUI::current()->RemoveObserver(this);
// Need to delete the view here manually _before_ we reset the dragged
// contents to NULL, otherwise if the view is animating to its destination
@@ -456,7 +456,7 @@ void TabDragController::Init(
std::find(tabs.begin(), tabs.end(), source_tab) - tabs.begin();
// Listen for Esc key presses.
- MessageLoopForUI::current()->AddObserver(this);
+ base::MessageLoopForUI::current()->AddObserver(this);
if (source_tab->width() > 0) {
offset_to_width_ratio_ = static_cast<float>(
diff --git a/chrome/browser/ui/views/tabs/tab_drag_controller.h b/chrome/browser/ui/views/tabs/tab_drag_controller.h
index cce9120..7b6fbbc 100644
--- a/chrome/browser/ui/views/tabs/tab_drag_controller.h
+++ b/chrome/browser/ui/views/tabs/tab_drag_controller.h
@@ -54,7 +54,7 @@ class TabStripModel;
// message loop.
class TabDragController : public content::WebContentsDelegate,
public content::NotificationObserver,
- public MessageLoopForUI::Observer,
+ public base::MessageLoopForUI::Observer,
public views::WidgetObserver,
public TabStripModelObserver {
public:
diff --git a/chrome/browser/ui/views/tabs/tab_drag_controller_interactive_uitest.cc b/chrome/browser/ui/views/tabs/tab_drag_controller_interactive_uitest.cc
index 59cb87b..c5e68f4 100644
--- a/chrome/browser/ui/views/tabs/tab_drag_controller_interactive_uitest.cc
+++ b/chrome/browser/ui/views/tabs/tab_drag_controller_interactive_uitest.cc
@@ -77,7 +77,7 @@ class QuitDraggingObserver : public content::NotificationObserver {
const content::NotificationSource& source,
const content::NotificationDetails& details) OVERRIDE {
DCHECK_EQ(chrome::NOTIFICATION_TAB_DRAG_LOOP_DONE, type);
- MessageLoopForUI::current()->Quit();
+ base::MessageLoopForUI::current()->Quit();
delete this;
}
@@ -266,7 +266,7 @@ class DetachToBrowserTabDragControllerTest
if (input_source() == INPUT_SOURCE_MOUSE)
return ui_controls::SendMouseMoveNotifyWhenDone(x, y, task);
#if defined(USE_ASH) && !defined(OS_WIN) // TODO(win_ash)
- MessageLoop::current()->PostTask(FROM_HERE, task);
+ base::MessageLoop::current()->PostTask(FROM_HERE, task);
event_generator_->MoveTouch(gfx::Point(x, y));
#else
NOTREACHED();
@@ -297,7 +297,7 @@ class DetachToBrowserTabDragControllerTest
// Schedule observer to quit message loop when done dragging. This has to
// be async so the message loop can run.
test::QuitWhenNotDraggingImpl();
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
} else {
// Touch events are sync, so we know we're not in a drag session. But some
// tests rely on the browser fully closing, which is async. So, run all
@@ -1266,7 +1266,7 @@ class DetachToBrowserInSeparateDisplayAndCancelTabDragControllerTest
void QuitWhenNotDragging() {
test::QuitWhenNotDraggingImpl();
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
}
private:
diff --git a/chrome/browser/ui/views/tabs/tab_strip_unittest.cc b/chrome/browser/ui/views/tabs/tab_strip_unittest.cc
index 1eed392..572e683 100644
--- a/chrome/browser/ui/views/tabs/tab_strip_unittest.cc
+++ b/chrome/browser/ui/views/tabs/tab_strip_unittest.cc
@@ -100,7 +100,7 @@ class TabStripTest : public testing::Test {
return tab->HitTestPoint(point_in_tab_coords);
}
- MessageLoopForUI ui_loop_;
+ base::MessageLoopForUI ui_loop_;
// Owned by TabStrip.
FakeBaseTabStripController* controller_;
// Owns |tab_strip_|.
diff --git a/chrome/browser/ui/views/uninstall_view.cc b/chrome/browser/ui/views/uninstall_view.cc
index a3fc778..5b5fa83 100644
--- a/chrome/browser/ui/views/uninstall_view.cc
+++ b/chrome/browser/ui/views/uninstall_view.cc
@@ -163,7 +163,7 @@ string16 UninstallView::GetItemAt(int index) {
namespace chrome {
int ShowUninstallBrowserPrompt(bool show_delete_profile) {
- DCHECK_EQ(MessageLoop::TYPE_UI, MessageLoop::current()->type());
+ DCHECK_EQ(base::MessageLoop::TYPE_UI, base::MessageLoop::current()->type());
int result = content::RESULT_CODE_NORMAL_EXIT;
views::AcceleratorHandler accelerator_handler;
base::RunLoop run_loop(&accelerator_handler);
diff --git a/chrome/browser/ui/views/user_data_dir_dialog_view.cc b/chrome/browser/ui/views/user_data_dir_dialog_view.cc
index 62d8d38..533380f 100644
--- a/chrome/browser/ui/views/user_data_dir_dialog_view.cc
+++ b/chrome/browser/ui/views/user_data_dir_dialog_view.cc
@@ -103,7 +103,7 @@ void UserDataDirDialogView::FileSelectionCanceled(void* params) {
namespace chrome {
base::FilePath ShowUserDataDirDialog(const base::FilePath& user_data_dir) {
- DCHECK_EQ(MessageLoop::TYPE_UI, MessageLoop::current()->type());
+ DCHECK_EQ(base::MessageLoop::TYPE_UI, base::MessageLoop::current()->type());
// When the window closes, it will delete itself.
UserDataDirDialogView* dialog = new UserDataDirDialogView(user_data_dir);
views::Widget::CreateWindow(dialog)->Show();
diff --git a/chrome/browser/ui/views/user_data_dir_dialog_view.h b/chrome/browser/ui/views/user_data_dir_dialog_view.h
index 0355e30..88bc6d2 100644
--- a/chrome/browser/ui/views/user_data_dir_dialog_view.h
+++ b/chrome/browser/ui/views/user_data_dir_dialog_view.h
@@ -19,7 +19,7 @@ class MessageBoxView;
// A dialog box that tells the user that we can't write to the specified user
// data directory. Provides the user a chance to pick a different directory.
class UserDataDirDialogView : public views::DialogDelegate,
- public MessageLoopForUI::Dispatcher,
+ public base::MessageLoopForUI::Dispatcher,
public ui::SelectFileDialog::Listener {
public:
explicit UserDataDirDialogView(const base::FilePath& user_data_dir);
diff --git a/chrome/browser/ui/views/web_dialog_view_browsertest.cc b/chrome/browser/ui/views/web_dialog_view_browsertest.cc
index 37fe1c7..63d68cd 100644
--- a/chrome/browser/ui/views/web_dialog_view_browsertest.cc
+++ b/chrome/browser/ui/views/web_dialog_view_browsertest.cc
@@ -57,8 +57,10 @@ class TestWebDialogView : public views::WebDialogView {
// Schedule message loop quit because we could be called while
// the bounds change call is on the stack and not in the nested message
// loop.
- MessageLoop::current()->PostTask(FROM_HERE, base::Bind(
- &MessageLoop::Quit, base::Unretained(MessageLoop::current())));
+ base::MessageLoop::current()->PostTask(
+ FROM_HERE,
+ base::Bind(&base::MessageLoop::Quit,
+ base::Unretained(base::MessageLoop::current())));
}
last_size_ = bounds.size();
diff --git a/chrome/browser/ui/webui/bidi_checker_web_ui_test.cc b/chrome/browser/ui/webui/bidi_checker_web_ui_test.cc
index c82a658..04dfda2 100644
--- a/chrome/browser/ui/webui/bidi_checker_web_ui_test.cc
+++ b/chrome/browser/ui/webui/bidi_checker_web_ui_test.cc
@@ -72,9 +72,10 @@ void ReloadLocaleResourcesOnIOThread(const std::string& new_locale) {
// crbug.com/95425, crbug.com/132752
void ReloadLocaleResources(const std::string& new_locale) {
content::BrowserThread::PostTaskAndReply(
- content::BrowserThread::IO, FROM_HERE,
+ content::BrowserThread::IO,
+ FROM_HERE,
base::Bind(&ReloadLocaleResourcesOnIOThread, base::ConstRef(new_locale)),
- MessageLoop::QuitClosure());
+ base::MessageLoop::QuitClosure());
content::RunMessageLoop();
}
diff --git a/chrome/browser/ui/webui/chromeos/login/network_state_informer.cc b/chrome/browser/ui/webui/chromeos/login/network_state_informer.cc
index 1c9ea71..7e3358f 100644
--- a/chrome/browser/ui/webui/chromeos/login/network_state_informer.cc
+++ b/chrome/browser/ui/webui/chromeos/login/network_state_informer.cc
@@ -95,7 +95,7 @@ void NetworkStateInformer::OnNetworkManagerChanged(NetworkLibrary* cros) {
check_state_.Reset(
base::Bind(&NetworkStateInformer::UpdateStateAndNotify,
base::Unretained(this)));
- MessageLoop::current()->PostDelayedTask(
+ base::MessageLoop::current()->PostDelayedTask(
FROM_HERE,
check_state_.callback(),
base::TimeDelta::FromSeconds(kNetworkStateCheckDelaySec));
diff --git a/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc b/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc
index 6858cb4..834b40e 100644
--- a/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc
+++ b/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc
@@ -527,7 +527,7 @@ void SigninScreenHandler::UpdateStateInternal(
&SigninScreenHandler::UpdateStateInternal,
weak_factory_.GetWeakPtr(),
state, service_path, connection_type, reason, force_update));
- MessageLoop::current()->PostDelayedTask(
+ base::MessageLoop::current()->PostDelayedTask(
FROM_HERE,
update_state_closure_.callback(),
base::TimeDelta::FromSeconds(kOfflineTimeoutSec));
@@ -543,7 +543,7 @@ void SigninScreenHandler::UpdateStateInternal(
base::Bind(&SigninScreenHandler::UpdateStateInternal,
weak_factory_.GetWeakPtr(),
state, service_path, connection_type, reason, true));
- MessageLoop::current()->PostDelayedTask(
+ base::MessageLoop::current()->PostDelayedTask(
FROM_HERE,
connecting_closure_.callback(),
base::TimeDelta::FromSeconds(kConnectingTimeoutSec));
diff --git a/chrome/browser/ui/webui/downloads_dom_handler.cc b/chrome/browser/ui/webui/downloads_dom_handler.cc
index 2f713ff..fc22628 100644
--- a/chrome/browser/ui/webui/downloads_dom_handler.cc
+++ b/chrome/browser/ui/webui/downloads_dom_handler.cc
@@ -355,7 +355,8 @@ void DownloadsDOMHandler::HandleDrag(const base::ListValue* args) {
gfx::NativeView view = web_contents->GetView()->GetNativeView();
{
// Enable nested tasks during DnD, while |DragDownload()| blocks.
- MessageLoop::ScopedNestableTaskAllower allow(MessageLoop::current());
+ base::MessageLoop::ScopedNestableTaskAllower allow(
+ base::MessageLoop::current());
download_util::DragDownload(file, icon, view);
}
}
diff --git a/chrome/browser/ui/webui/downloads_dom_handler_browsertest.cc b/chrome/browser/ui/webui/downloads_dom_handler_browsertest.cc
index 3f07221..01133a2 100644
--- a/chrome/browser/ui/webui/downloads_dom_handler_browsertest.cc
+++ b/chrome/browser/ui/webui/downloads_dom_handler_browsertest.cc
@@ -88,16 +88,18 @@ class MockDownloadsDOMHandler : public DownloadsDOMHandler {
virtual void CallDownloadsList(const base::ListValue& downloads) OVERRIDE {
downloads_list_.reset(downloads.DeepCopy());
if (waiting_list_) {
- content::BrowserThread::PostTask(
- content::BrowserThread::UI, FROM_HERE, MessageLoop::QuitClosure());
+ content::BrowserThread::PostTask(content::BrowserThread::UI,
+ FROM_HERE,
+ base::MessageLoop::QuitClosure());
}
}
virtual void CallDownloadUpdated(const base::ListValue& download) OVERRIDE {
download_updated_.reset(download.DeepCopy());
if (waiting_updated_) {
- content::BrowserThread::PostTask(
- content::BrowserThread::UI, FROM_HERE, MessageLoop::QuitClosure());
+ content::BrowserThread::PostTask(content::BrowserThread::UI,
+ FROM_HERE,
+ base::MessageLoop::QuitClosure());
}
}
diff --git a/chrome/browser/ui/webui/favicon_source_unittest.cc b/chrome/browser/ui/webui/favicon_source_unittest.cc
index e47861e..5a854ac 100644
--- a/chrome/browser/ui/webui/favicon_source_unittest.cc
+++ b/chrome/browser/ui/webui/favicon_source_unittest.cc
@@ -16,9 +16,9 @@
class FaviconSourceTest : public testing::Test {
public:
FaviconSourceTest()
- : loop_(MessageLoop::TYPE_UI),
- ui_thread_(content::BrowserThread::UI, MessageLoop::current()),
- io_thread_(content::BrowserThread::IO, MessageLoop::current()),
+ : loop_(base::MessageLoop::TYPE_UI),
+ ui_thread_(content::BrowserThread::UI, base::MessageLoop::current()),
+ io_thread_(content::BrowserThread::IO, base::MessageLoop::current()),
profile_(new TestingProfile()),
favicon_source_(
new FaviconSource(profile_.get(), FaviconSource::ANY)) {
@@ -55,7 +55,7 @@ class FaviconSourceTest : public testing::Test {
FaviconSource* favicon_source() const { return favicon_source_.get(); }
private:
- MessageLoop loop_;
+ base::MessageLoop loop_;
content::TestBrowserThread ui_thread_;
content::TestBrowserThread io_thread_;
scoped_ptr<TestingProfile> profile_;
diff --git a/chrome/browser/ui/webui/fileicon_source_unittest.cc b/chrome/browser/ui/webui/fileicon_source_unittest.cc
index b78af8b..18cbde1 100644
--- a/chrome/browser/ui/webui/fileicon_source_unittest.cc
+++ b/chrome/browser/ui/webui/fileicon_source_unittest.cc
@@ -32,16 +32,16 @@ class TestFileIconSource : public FileIconSource {
class FileIconSourceTest : public testing::Test {
public:
FileIconSourceTest()
- : loop_(MessageLoop::TYPE_UI),
- ui_thread_(BrowserThread::UI, MessageLoop::current()),
- file_thread_(BrowserThread::FILE, MessageLoop::current()) {}
+ : loop_(base::MessageLoop::TYPE_UI),
+ ui_thread_(BrowserThread::UI, base::MessageLoop::current()),
+ file_thread_(BrowserThread::FILE, base::MessageLoop::current()) {}
static TestFileIconSource* CreateFileIconSource() {
return new TestFileIconSource();
}
private:
- MessageLoop loop_;
+ base::MessageLoop loop_;
content::TestBrowserThread ui_thread_;
content::TestBrowserThread file_thread_;
};
diff --git a/chrome/browser/ui/webui/ntp/android/partner_bookmarks_shim_unittest.cc b/chrome/browser/ui/webui/ntp/android/partner_bookmarks_shim_unittest.cc
index da47211..5f05ca1 100644
--- a/chrome/browser/ui/webui/ntp/android/partner_bookmarks_shim_unittest.cc
+++ b/chrome/browser/ui/webui/ntp/android/partner_bookmarks_shim_unittest.cc
@@ -58,7 +58,7 @@ class PartnerBookmarksShimTest : public testing::Test {
scoped_ptr<TestingProfile> profile_;
- MessageLoopForUI message_loop_;
+ base::MessageLoopForUI message_loop_;
content::TestBrowserThread ui_thread_;
content::TestBrowserThread file_thread_;
diff --git a/chrome/browser/ui/webui/sync_internals_ui_unittest.cc b/chrome/browser/ui/webui/sync_internals_ui_unittest.cc
index bdb07a6..5ec4e10 100644
--- a/chrome/browser/ui/webui/sync_internals_ui_unittest.cc
+++ b/chrome/browser/ui/webui/sync_internals_ui_unittest.cc
@@ -76,7 +76,7 @@ class SyncInternalsUITestWithService : public ChromeRenderViewHostTestHarness {
// Needed by |sync_internals_ui_|'s constructor. The
// message loop is provided by ChromeRenderViewHostTestHarness.
content::TestBrowserThread ui_thread_(BrowserThread::UI,
- MessageLoopForUI::current());
+ base::MessageLoopForUI::current());
// |sync_internals_ui_|'s constructor triggers all the
// expectations above.
web_ui_.reset(new TestSyncWebUI(web_contents()));
@@ -156,7 +156,7 @@ class SyncInternalsUITestWithoutService
// Needed by |sync_internals_ui_|'s constructor. The
// message loop is provided by ChromeRenderViewHostTestHarness.
content::TestBrowserThread ui_thread_(BrowserThread::UI,
- MessageLoopForUI::current());
+ base::MessageLoopForUI::current());
// |sync_internals_ui_|'s constructor triggers all the
// expectations above.
web_ui_.reset(new TestSyncWebUI(web_contents()));
diff --git a/chrome/browser/ui/webui/sync_setup_handler.cc b/chrome/browser/ui/webui/sync_setup_handler.cc
index cc40700..1b08e61 100644
--- a/chrome/browser/ui/webui/sync_setup_handler.cc
+++ b/chrome/browser/ui/webui/sync_setup_handler.cc
@@ -1302,7 +1302,7 @@ void SyncSetupHandler::CloseGaiaSigninPage() {
// if the user clicks 'cancel' in the enterprise signin dialog), so
// closing this tab in mid-handler can cause crashes. Instead, close it
// via a task so we know we aren't in the middle of any webui code.
- MessageLoop::current()->PostTask(
+ base::MessageLoop::current()->PostTask(
FROM_HERE,
base::Bind(&CloseTab, base::Unretained(active_gaia_signin_tab_)));
diff --git a/chrome/browser/ui/webui/sync_setup_handler_unittest.cc b/chrome/browser/ui/webui/sync_setup_handler_unittest.cc
index ded7816..faec534 100644
--- a/chrome/browser/ui/webui/sync_setup_handler_unittest.cc
+++ b/chrome/browser/ui/webui/sync_setup_handler_unittest.cc
@@ -417,7 +417,7 @@ class SyncSetupHandlerTest : public testing::TestWithParam<bool> {
ProfileSyncServiceMock* mock_pss_;
GoogleServiceAuthError error_;
// MessageLoop instance is required to work with OneShotTimer.
- MessageLoop message_loop_;
+ base::MessageLoop message_loop_;
SigninManagerBase* mock_signin_;
TestWebUI web_ui_;
scoped_ptr<TestingSyncSetupHandler> handler_;
diff --git a/chrome/browser/ui/webui/theme_source_unittest.cc b/chrome/browser/ui/webui/theme_source_unittest.cc
index 4f21862..a3d09d1 100644
--- a/chrome/browser/ui/webui/theme_source_unittest.cc
+++ b/chrome/browser/ui/webui/theme_source_unittest.cc
@@ -19,7 +19,7 @@ class WebUISourcesTest : public testing::Test {
public:
WebUISourcesTest()
: result_data_size_(0),
- ui_thread_(BrowserThread::UI, MessageLoop::current()) {}
+ ui_thread_(BrowserThread::UI, base::MessageLoop::current()) {}
TestingProfile* profile() const { return profile_.get(); }
ThemeSource* theme_source() const { return theme_source_.get(); }
@@ -50,7 +50,7 @@ class WebUISourcesTest : public testing::Test {
content::URLDataSource::GotDataCallback callback_;
- MessageLoop loop_;
+ base::MessageLoop loop_;
content::TestBrowserThread ui_thread_;
scoped_ptr<TestingProfile> profile_;
@@ -77,7 +77,7 @@ TEST_F(WebUISourcesTest, ThemeSourceImages) {
TEST_F(WebUISourcesTest, ThemeSourceCSS) {
content::TestBrowserThread io_thread(BrowserThread::IO,
- MessageLoop::current());
+ base::MessageLoop::current());
// Generating the test data for the NTP CSS would just involve copying the
// method, or being super brittle and hard-coding the result (requiring
// an update to the unittest every time the CSS template changes), so we
diff --git a/chrome/browser/ui/webui/web_ui_test_handler.cc b/chrome/browser/ui/webui/web_ui_test_handler.cc
index 2f13e9f..8624c89 100644
--- a/chrome/browser/ui/webui/web_ui_test_handler.cc
+++ b/chrome/browser/ui/webui/web_ui_test_handler.cc
@@ -61,7 +61,7 @@ void WebUITestHandler::HandleTestResult(const ListValue* test_result) {
// Quit the message loop if |is_waiting_| so waiting process can get result or
// error. To ensure this gets done, do this before ASSERT* calls.
if (is_waiting_)
- MessageLoopForUI::current()->Quit();
+ base::MessageLoopForUI::current()->Quit();
SCOPED_TRACE("WebUITestHandler::HandleTestResult");
@@ -81,7 +81,7 @@ void WebUITestHandler::JavaScriptComplete(const base::Value* result) {
// Quit the message loop if |is_waiting_| so waiting process can get result or
// error. To ensure this gets done, do this before ASSERT* calls.
if (is_waiting_)
- MessageLoopForUI::current()->Quit();
+ base::MessageLoopForUI::current()->Quit();
SCOPED_TRACE("WebUITestHandler::JavaScriptComplete");
diff --git a/chrome/browser/ui/window_sizer/window_sizer_ash_unittest.cc b/chrome/browser/ui/window_sizer/window_sizer_ash_unittest.cc
index 780969b..a042a31 100644
--- a/chrome/browser/ui/window_sizer/window_sizer_ash_unittest.cc
+++ b/chrome/browser/ui/window_sizer/window_sizer_ash_unittest.cc
@@ -95,7 +95,7 @@ class WindowSizerTestWithBrowser : public WindowSizerTest {
// The class function definitions from window_sizer_common_unittest.h
WindowSizerTestWithBrowser::WindowSizerTestWithBrowser() {
// Set up a UI message thread.
- MessageLoopForUI* ui_loop = message_loop();
+ base::MessageLoopForUI* ui_loop = message_loop();
ui_thread_.reset(
new content::TestBrowserThread(content::BrowserThread::UI, ui_loop));
}
diff --git a/chrome/browser/ui/zoom/zoom_controller_unittest.cc b/chrome/browser/ui/zoom/zoom_controller_unittest.cc
index 07d6338..2c49a02 100644
--- a/chrome/browser/ui/zoom/zoom_controller_unittest.cc
+++ b/chrome/browser/ui/zoom/zoom_controller_unittest.cc
@@ -28,7 +28,7 @@ class TestZoomObserver : public ZoomObserver {
class ZoomControllerTest : public ChromeRenderViewHostTestHarness {
public:
ZoomControllerTest()
- : ui_thread_(content::BrowserThread::UI, MessageLoop::current()) {}
+ : ui_thread_(content::BrowserThread::UI, base::MessageLoop::current()) {}
virtual void SetUp() OVERRIDE {
ChromeRenderViewHostTestHarness::SetUp();