summaryrefslogtreecommitdiffstats
path: root/ui/views
diff options
context:
space:
mode:
authorxhwang@chromium.org <xhwang@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-29 19:01:48 +0000
committerxhwang@chromium.org <xhwang@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-29 19:01:48 +0000
commit7060d65997d7b88b05137c70b1b509fbcafb0850 (patch)
treeb143e18a947e2b82990a077d8d5384ebf969f468 /ui/views
parentd10f82f6c62676297f2bb8f5908684f8ccdbaab8 (diff)
downloadchromium_src-7060d65997d7b88b05137c70b1b509fbcafb0850.zip
chromium_src-7060d65997d7b88b05137c70b1b509fbcafb0850.tar.gz
chromium_src-7060d65997d7b88b05137c70b1b509fbcafb0850.tar.bz2
ui: Use base::MessageLoop.
BUG=236029 R=ben@chromium.org Review URL: https://chromiumcodereview.appspot.com/14061025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@197100 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/views')
-rw-r--r--ui/views/animation/bounds_animator_unittest.cc4
-rw-r--r--ui/views/controls/button/button_dropdown.cc2
-rw-r--r--ui/views/controls/menu/menu_controller.cc2
-rw-r--r--ui/views/controls/menu/menu_controller.h2
-rw-r--r--ui/views/controls/menu/menu_controller_aura.cc4
-rw-r--r--ui/views/controls/menu/menu_controller_win.cc4
-rw-r--r--ui/views/controls/menu/native_menu_win.cc2
-rw-r--r--ui/views/controls/slider.cc2
-rw-r--r--ui/views/controls/textfield/native_textfield_views.cc4
-rw-r--r--ui/views/examples/examples_window.cc2
-rw-r--r--ui/views/examples/examples_window_with_content.cc2
-rw-r--r--ui/views/focus/accelerator_handler.h2
-rw-r--r--ui/views/mouse_watcher.cc14
-rw-r--r--ui/views/view_unittest.cc2
-rw-r--r--ui/views/widget/aero_tooltip_manager.cc3
-rw-r--r--ui/views/widget/desktop_aura/desktop_dispatcher_client.cc4
-rw-r--r--ui/views/widget/desktop_aura/desktop_dispatcher_client.h2
-rw-r--r--ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11.cc4
-rw-r--r--ui/views/widget/desktop_aura/desktop_root_window_host_x11.cc2
-rw-r--r--ui/views/widget/desktop_aura/desktop_root_window_host_x11.h10
-rw-r--r--ui/views/widget/desktop_aura/x11_desktop_handler.h5
-rw-r--r--ui/views/widget/desktop_aura/x11_desktop_window_move_client.cc4
-rw-r--r--ui/views/widget/desktop_aura/x11_desktop_window_move_client.h6
-rw-r--r--ui/views/widget/native_widget_aura.cc2
-rw-r--r--ui/views/widget/native_widget_aura_unittest.cc4
-rw-r--r--ui/views/widget/native_widget_win_unittest.cc2
-rw-r--r--ui/views/widget/tooltip_manager_win.cc2
-rw-r--r--ui/views/win/hwnd_message_handler.cc10
-rw-r--r--ui/views/win/hwnd_message_handler.h7
29 files changed, 58 insertions, 57 deletions
diff --git a/ui/views/animation/bounds_animator_unittest.cc b/ui/views/animation/bounds_animator_unittest.cc
index 7f80261..ed7dca5 100644
--- a/ui/views/animation/bounds_animator_unittest.cc
+++ b/ui/views/animation/bounds_animator_unittest.cc
@@ -100,7 +100,7 @@ class BoundsAnimatorTest : public testing::Test {
TestBoundsAnimator* animator() { return &animator_; }
private:
- MessageLoopForUI message_loop_;
+ base::MessageLoopForUI message_loop_;
TestView parent_;
TestView* child_; // Owned by |parent_|.
TestBoundsAnimator animator_;
@@ -122,7 +122,7 @@ TEST_F(BoundsAnimatorTest, AnimateViewTo) {
// Run the message loop; the delegate exits the loop when the animation is
// done.
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
// Make sure the bounds match of the view that was animated match.
EXPECT_EQ(target_bounds, child()->bounds());
diff --git a/ui/views/controls/button/button_dropdown.cc b/ui/views/controls/button/button_dropdown.cc
index 4261294..5cb3b20 100644
--- a/ui/views/controls/button/button_dropdown.cc
+++ b/ui/views/controls/button/button_dropdown.cc
@@ -67,7 +67,7 @@ bool ButtonDropDown::OnMousePressed(const ui::MouseEvent& event) {
y_position_on_lbuttondown_ = event.y();
// Schedule a task that will show the menu.
- MessageLoop::current()->PostDelayedTask(
+ base::MessageLoop::current()->PostDelayedTask(
FROM_HERE,
base::Bind(&ButtonDropDown::ShowDropDownMenu,
show_menu_factory_.GetWeakPtr()),
diff --git a/ui/views/controls/menu/menu_controller.cc b/ui/views/controls/menu/menu_controller.cc
index d849ac0b..584da3c 100644
--- a/ui/views/controls/menu/menu_controller.cc
+++ b/ui/views/controls/menu/menu_controller.cc
@@ -2255,7 +2255,7 @@ void MenuController::SetExitType(ExitType type) {
message_loop_depth_;
if (quit_now)
- MessageLoop::current()->QuitNow();
+ base::MessageLoop::current()->QuitNow();
}
void MenuController::HandleMouseLocation(SubmenuView* source,
diff --git a/ui/views/controls/menu/menu_controller.h b/ui/views/controls/menu/menu_controller.h
index badd97b..8f0a847 100644
--- a/ui/views/controls/menu/menu_controller.h
+++ b/ui/views/controls/menu/menu_controller.h
@@ -45,7 +45,7 @@ class MenuRunnerImpl;
// MenuController is used internally by the various menu classes to manage
// showing, selecting and drag/drop for menus. All relevant events are
// forwarded to the MenuController from SubmenuView and MenuHost.
-class VIEWS_EXPORT MenuController : public MessageLoop::Dispatcher,
+class VIEWS_EXPORT MenuController : public base::MessageLoop::Dispatcher,
public WidgetObserver {
public:
// Enumeration of how the menu should exit.
diff --git a/ui/views/controls/menu/menu_controller_aura.cc b/ui/views/controls/menu/menu_controller_aura.cc
index 18109d4..c65c97f 100644
--- a/ui/views/controls/menu/menu_controller_aura.cc
+++ b/ui/views/controls/menu/menu_controller_aura.cc
@@ -92,8 +92,8 @@ void MenuController::RunMessageLoop(bool nested_menu) {
aura::client::GetDispatcherClient(root)->
RunWithDispatcher(this, owner_->GetNativeWindow(), true);
} else {
- MessageLoopForUI* loop = MessageLoopForUI::current();
- MessageLoop::ScopedNestableTaskAllower allow(loop);
+ base::MessageLoopForUI* loop = base::MessageLoopForUI::current();
+ base::MessageLoop::ScopedNestableTaskAllower allow(loop);
base::RunLoop run_loop(this);
run_loop.Run();
}
diff --git a/ui/views/controls/menu/menu_controller_win.cc b/ui/views/controls/menu/menu_controller_win.cc
index ce74d1a..bbf7e9b 100644
--- a/ui/views/controls/menu/menu_controller_win.cc
+++ b/ui/views/controls/menu/menu_controller_win.cc
@@ -10,8 +10,8 @@
namespace views {
void MenuController::RunMessageLoop(bool nested_menu) {
- MessageLoopForUI* loop = MessageLoopForUI::current();
- MessageLoop::ScopedNestableTaskAllower allow(loop);
+ base::MessageLoopForUI* loop = base::MessageLoopForUI::current();
+ base::MessageLoop::ScopedNestableTaskAllower allow(loop);
base::RunLoop run_loop(this);
run_loop.Run();
}
diff --git a/ui/views/controls/menu/native_menu_win.cc b/ui/views/controls/menu/native_menu_win.cc
index 98e20e2..4b5f564 100644
--- a/ui/views/controls/menu/native_menu_win.cc
+++ b/ui/views/controls/menu/native_menu_win.cc
@@ -455,7 +455,7 @@ void NativeMenuWin::RunMenuAt(const gfx::Point& point, int alignment) {
// state. Instead post a task, then notify. This mirrors what WM_MENUCOMMAND
// does.
menu_to_select_factory_.InvalidateWeakPtrs();
- MessageLoop::current()->PostTask(
+ base::MessageLoop::current()->PostTask(
FROM_HERE,
base::Bind(&NativeMenuWin::DelayedSelect,
menu_to_select_factory_.GetWeakPtr()));
diff --git a/ui/views/controls/slider.cc b/ui/views/controls/slider.cc
index 8c82ea3..8be3c925 100644
--- a/ui/views/controls/slider.cc
+++ b/ui/views/controls/slider.cc
@@ -91,7 +91,7 @@ void Slider::SetValueInternal(float value, SliderChangeReason reason) {
if (listener_)
listener_->SliderValueChanged(this, value_, old_value, reason);
- if (old_value_valid && MessageLoop::current()) {
+ if (old_value_valid && base::MessageLoop::current()) {
// Do not animate when setting the value of the slider for the first time.
// There is no message-loop when running tests. So we cannot animate then.
animating_value_ = old_value;
diff --git a/ui/views/controls/textfield/native_textfield_views.cc b/ui/views/controls/textfield/native_textfield_views.cc
index b985b40..992d7b4 100644
--- a/ui/views/controls/textfield/native_textfield_views.cc
+++ b/ui/views/controls/textfield/native_textfield_views.cc
@@ -678,7 +678,7 @@ void NativeTextfieldViews::HandleFocus() {
SchedulePaint();
OnCaretBoundsChanged();
// Start blinking cursor.
- MessageLoop::current()->PostDelayedTask(
+ base::MessageLoop::current()->PostDelayedTask(
FROM_HERE,
base::Bind(&NativeTextfieldViews::UpdateCursor,
cursor_timer_.GetWeakPtr()),
@@ -1078,7 +1078,7 @@ void NativeTextfieldViews::UpdateColorsFromTheme(const ui::NativeTheme* theme) {
void NativeTextfieldViews::UpdateCursor() {
is_cursor_visible_ = !is_cursor_visible_;
RepaintCursor();
- MessageLoop::current()->PostDelayedTask(
+ base::MessageLoop::current()->PostDelayedTask(
FROM_HERE,
base::Bind(&NativeTextfieldViews::UpdateCursor,
cursor_timer_.GetWeakPtr()),
diff --git a/ui/views/examples/examples_window.cc b/ui/views/examples/examples_window.cc
index 73c5094..e90d5bb 100644
--- a/ui/views/examples/examples_window.cc
+++ b/ui/views/examples/examples_window.cc
@@ -102,7 +102,7 @@ class ExamplesWindowContents : public WidgetDelegateView,
virtual void WindowClosing() OVERRIDE {
instance_ = NULL;
if (operation_ == QUIT_ON_CLOSE)
- MessageLoopForUI::current()->Quit();
+ base::MessageLoopForUI::current()->Quit();
}
// Overridden from View:
diff --git a/ui/views/examples/examples_window_with_content.cc b/ui/views/examples/examples_window_with_content.cc
index a8705ed..9eacad8 100644
--- a/ui/views/examples/examples_window_with_content.cc
+++ b/ui/views/examples/examples_window_with_content.cc
@@ -111,7 +111,7 @@ class ExamplesWindowContents : public WidgetDelegateView,
virtual void WindowClosing() OVERRIDE {
instance_ = NULL;
if (operation_ == QUIT_ON_CLOSE)
- MessageLoopForUI::current()->Quit();
+ base::MessageLoopForUI::current()->Quit();
}
// Overridden from View:
diff --git a/ui/views/focus/accelerator_handler.h b/ui/views/focus/accelerator_handler.h
index 95edaea..632ca03 100644
--- a/ui/views/focus/accelerator_handler.h
+++ b/ui/views/focus/accelerator_handler.h
@@ -27,7 +27,7 @@ bool VIEWS_EXPORT DispatchXEvent(XEvent* xevent);
#if defined(OS_MACOSX)
class VIEWS_EXPORT AcceleratorHandler {
#else
-class VIEWS_EXPORT AcceleratorHandler : public MessageLoop::Dispatcher {
+class VIEWS_EXPORT AcceleratorHandler : public base::MessageLoop::Dispatcher {
#endif // defined(OS_MACOSX)
public:
AcceleratorHandler();
diff --git a/ui/views/mouse_watcher.cc b/ui/views/mouse_watcher.cc
index 88ec5f4..b74aa6a 100644
--- a/ui/views/mouse_watcher.cc
+++ b/ui/views/mouse_watcher.cc
@@ -19,16 +19,16 @@ namespace views {
// the listener is notified.
const int kNotifyListenerTimeMs = 300;
-class MouseWatcher::Observer : public MessageLoopForUI::Observer {
+class MouseWatcher::Observer : public base::MessageLoopForUI::Observer {
public:
explicit Observer(MouseWatcher* mouse_watcher)
: mouse_watcher_(mouse_watcher),
notify_listener_factory_(this) {
- MessageLoopForUI::current()->AddObserver(this);
+ base::MessageLoopForUI::current()->AddObserver(this);
}
virtual ~Observer() {
- MessageLoopForUI::current()->RemoveObserver(this);
+ base::MessageLoopForUI::current()->RemoveObserver(this);
}
// MessageLoop::Observer implementation:
@@ -94,13 +94,13 @@ class MouseWatcher::Observer : public MessageLoopForUI::Observer {
// Mouse moved outside the host's zone, start a timer to notify the
// listener.
if (!notify_listener_factory_.HasWeakPtrs()) {
- MessageLoop::current()->PostDelayedTask(
+ base::MessageLoop::current()->PostDelayedTask(
FROM_HERE,
base::Bind(&Observer::NotifyListener,
notify_listener_factory_.GetWeakPtr()),
- event_type == MouseWatcherHost::MOUSE_MOVE ?
- base::TimeDelta::FromMilliseconds(kNotifyListenerTimeMs) :
- mouse_watcher_->notify_on_exit_time_);
+ event_type == MouseWatcherHost::MOUSE_MOVE
+ ? base::TimeDelta::FromMilliseconds(kNotifyListenerTimeMs)
+ : mouse_watcher_->notify_on_exit_time_);
}
} else {
// Mouse moved quickly out of the host and then into it again, so cancel
diff --git a/ui/views/view_unittest.cc b/ui/views/view_unittest.cc
index 0637a50..fafb582 100644
--- a/ui/views/view_unittest.cc
+++ b/ui/views/view_unittest.cc
@@ -1602,7 +1602,7 @@ class TestDialog : public DialogDelegate, public ButtonListener {
widget_->Close();
widget_ = NULL;
// delegate has to be alive while shutting down.
- MessageLoop::current()->DeleteSoon(FROM_HERE, this);
+ base::MessageLoop::current()->DeleteSoon(FROM_HERE, this);
}
// DialogDelegate implementation:
diff --git a/ui/views/widget/aero_tooltip_manager.cc b/ui/views/widget/aero_tooltip_manager.cc
index 7976bc4..620d821 100644
--- a/ui/views/widget/aero_tooltip_manager.cc
+++ b/ui/views/widget/aero_tooltip_manager.cc
@@ -95,7 +95,8 @@ AeroTooltipManager::InitialTimer::InitialTimer(AeroTooltipManager* manager)
}
void AeroTooltipManager::InitialTimer::Start(int time) {
- MessageLoop::current()->PostDelayedTask(FROM_HERE,
+ base::MessageLoop::current()->PostDelayedTask(
+ FROM_HERE,
base::Bind(&InitialTimer::Execute, this),
base::TimeDelta::FromMilliseconds(time));
}
diff --git a/ui/views/widget/desktop_aura/desktop_dispatcher_client.cc b/ui/views/widget/desktop_aura/desktop_dispatcher_client.cc
index 004e72f..bd4ba02 100644
--- a/ui/views/widget/desktop_aura/desktop_dispatcher_client.cc
+++ b/ui/views/widget/desktop_aura/desktop_dispatcher_client.cc
@@ -13,14 +13,14 @@ DesktopDispatcherClient::DesktopDispatcherClient() {}
DesktopDispatcherClient::~DesktopDispatcherClient() {}
void DesktopDispatcherClient::RunWithDispatcher(
- MessageLoop::Dispatcher* nested_dispatcher,
+ base::MessageLoop::Dispatcher* nested_dispatcher,
aura::Window* associated_window,
bool nestable_tasks_allowed) {
// TODO(erg): This class has been copypastad from
// ash/accelerators/nested_dispatcher_controller.cc. I have left my changes
// commented out because I don't entirely understand the implications of the
// change.
- MessageLoopForUI* loop = MessageLoopForUI::current();
+ base::MessageLoopForUI* loop = base::MessageLoopForUI::current();
bool did_allow_task_nesting = loop->NestableTasksAllowed();
loop->SetNestableTasksAllowed(nestable_tasks_allowed);
diff --git a/ui/views/widget/desktop_aura/desktop_dispatcher_client.h b/ui/views/widget/desktop_aura/desktop_dispatcher_client.h
index 76a2c8b..5e7a517 100644
--- a/ui/views/widget/desktop_aura/desktop_dispatcher_client.h
+++ b/ui/views/widget/desktop_aura/desktop_dispatcher_client.h
@@ -18,7 +18,7 @@ class VIEWS_EXPORT DesktopDispatcherClient
DesktopDispatcherClient();
virtual ~DesktopDispatcherClient();
- virtual void RunWithDispatcher(MessageLoop::Dispatcher* dispatcher,
+ virtual void RunWithDispatcher(base::MessageLoop::Dispatcher* dispatcher,
aura::Window* associated_window,
bool nestable_tasks_allowed) OVERRIDE;
diff --git a/ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11.cc b/ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11.cc
index 8e1ed3b..e0ad0e3 100644
--- a/ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11.cc
+++ b/ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11.cc
@@ -52,8 +52,8 @@ const char* kAtomsToCache[] = {
namespace views {
-class DesktopDragDropClientAuraX11::X11DragContext
- : public MessageLoop::Dispatcher {
+class DesktopDragDropClientAuraX11::X11DragContext :
+ public base::MessageLoop::Dispatcher {
public:
X11DragContext(ui::X11AtomCache* atom_cache,
const XClientMessageEvent& event);
diff --git a/ui/views/widget/desktop_aura/desktop_root_window_host_x11.cc b/ui/views/widget/desktop_aura/desktop_root_window_host_x11.cc
index 2bf23c9..62348f1 100644
--- a/ui/views/widget/desktop_aura/desktop_root_window_host_x11.cc
+++ b/ui/views/widget/desktop_aura/desktop_root_window_host_x11.cc
@@ -368,7 +368,7 @@ void DesktopRootWindowHostX11::Close() {
// we don't destroy the window before the callback returned (as the caller
// may delete ourselves on destroy and the ATL callback would still
// dereference us when the callback returns).
- MessageLoop::current()->PostTask(
+ base::MessageLoop::current()->PostTask(
FROM_HERE,
base::Bind(&DesktopRootWindowHostX11::CloseNow,
close_widget_factory_.GetWeakPtr()));
diff --git a/ui/views/widget/desktop_aura/desktop_root_window_host_x11.h b/ui/views/widget/desktop_aura/desktop_root_window_host_x11.h
index 8d5cc0c..96abdfe 100644
--- a/ui/views/widget/desktop_aura/desktop_root_window_host_x11.h
+++ b/ui/views/widget/desktop_aura/desktop_root_window_host_x11.h
@@ -40,11 +40,11 @@ namespace corewm {
class CursorManager;
}
-class VIEWS_EXPORT DesktopRootWindowHostX11
- : public DesktopRootWindowHost,
- public aura::RootWindowHost,
- public ui::DesktopSelectionProviderAuraX11,
- public MessageLoop::Dispatcher {
+class VIEWS_EXPORT DesktopRootWindowHostX11 :
+ public DesktopRootWindowHost,
+ public aura::RootWindowHost,
+ public ui::DesktopSelectionProviderAuraX11,
+ public base::MessageLoop::Dispatcher {
public:
DesktopRootWindowHostX11(
internal::NativeWidgetDelegate* native_widget_delegate,
diff --git a/ui/views/widget/desktop_aura/x11_desktop_handler.h b/ui/views/widget/desktop_aura/x11_desktop_handler.h
index 151c7ae..2415377 100644
--- a/ui/views/widget/desktop_aura/x11_desktop_handler.h
+++ b/ui/views/widget/desktop_aura/x11_desktop_handler.h
@@ -21,9 +21,8 @@ namespace views {
// A singleton that owns global objects related to the desktop and listens for
// X11 events on the X11 root window. Destroys itself when aura::Env is
// deleted.
-class VIEWS_EXPORT X11DesktopHandler
- : public MessageLoop::Dispatcher,
- public aura::EnvObserver {
+class VIEWS_EXPORT X11DesktopHandler : public base::MessageLoop::Dispatcher,
+ public aura::EnvObserver {
public:
// Returns the singleton handler.
static X11DesktopHandler* get();
diff --git a/ui/views/widget/desktop_aura/x11_desktop_window_move_client.cc b/ui/views/widget/desktop_aura/x11_desktop_window_move_client.cc
index fbe63f0..3ee5fc8 100644
--- a/ui/views/widget/desktop_aura/x11_desktop_window_move_client.cc
+++ b/ui/views/widget/desktop_aura/x11_desktop_window_move_client.cc
@@ -113,8 +113,8 @@ aura::client::WindowMoveResult X11DesktopWindowMoveClient::RunMoveLoop(
return aura::client::MOVE_CANCELED;
}
- MessageLoopForUI* loop = MessageLoopForUI::current();
- MessageLoop::ScopedNestableTaskAllower allow_nested(loop);
+ base::MessageLoopForUI* loop = base::MessageLoopForUI::current();
+ base::MessageLoop::ScopedNestableTaskAllower allow_nested(loop);
base::RunLoop run_loop(aura::Env::GetInstance()->GetDispatcher());
quit_closure_ = run_loop.QuitClosure();
run_loop.Run();
diff --git a/ui/views/widget/desktop_aura/x11_desktop_window_move_client.h b/ui/views/widget/desktop_aura/x11_desktop_window_move_client.h
index 5034068..ea55bb5 100644
--- a/ui/views/widget/desktop_aura/x11_desktop_window_move_client.h
+++ b/ui/views/widget/desktop_aura/x11_desktop_window_move_client.h
@@ -24,9 +24,9 @@ class RootWindow;
namespace views {
// When we're dragging tabs, we need to manually position our window.
-class VIEWS_EXPORT X11DesktopWindowMoveClient
- : public MessageLoop::Dispatcher,
- public aura::client::WindowMoveClient {
+class VIEWS_EXPORT X11DesktopWindowMoveClient :
+ public base::MessageLoop::Dispatcher,
+ public aura::client::WindowMoveClient {
public:
X11DesktopWindowMoveClient();
virtual ~X11DesktopWindowMoveClient();
diff --git a/ui/views/widget/native_widget_aura.cc b/ui/views/widget/native_widget_aura.cc
index 86181c9..754b258 100644
--- a/ui/views/widget/native_widget_aura.cc
+++ b/ui/views/widget/native_widget_aura.cc
@@ -411,7 +411,7 @@ void NativeWidgetAura::Close() {
}
if (!close_widget_factory_.HasWeakPtrs()) {
- MessageLoop::current()->PostTask(
+ base::MessageLoop::current()->PostTask(
FROM_HERE,
base::Bind(&NativeWidgetAura::CloseNow,
close_widget_factory_.GetWeakPtr()));
diff --git a/ui/views/widget/native_widget_aura_unittest.cc b/ui/views/widget/native_widget_aura_unittest.cc
index d416ef7..13e7de5 100644
--- a/ui/views/widget/native_widget_aura_unittest.cc
+++ b/ui/views/widget/native_widget_aura_unittest.cc
@@ -53,7 +53,7 @@ class NativeWidgetAuraTest : public testing::Test {
aura::RootWindow* root_window() { return aura_test_helper_->root_window(); }
private:
- MessageLoopForUI message_loop_;
+ base::MessageLoopForUI message_loop_;
scoped_ptr<aura::test::AuraTestHelper> aura_test_helper_;
DISALLOW_COPY_AND_ASSIGN(NativeWidgetAuraTest);
@@ -404,7 +404,7 @@ TEST_F(NativeWidgetAuraTest, NoCrashOnThemeAfterClose) {
NativeWidgetAura* window = Init(parent.get(), widget.get());
window->Show();
window->Close();
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
widget->GetNativeTheme(); // Shouldn't crash.
}
diff --git a/ui/views/widget/native_widget_win_unittest.cc b/ui/views/widget/native_widget_win_unittest.cc
index fd324e1..3cee80f 100644
--- a/ui/views/widget/native_widget_win_unittest.cc
+++ b/ui/views/widget/native_widget_win_unittest.cc
@@ -33,7 +33,7 @@ class NativeWidgetWinTest : public testing::Test {
}
private:
- MessageLoopForUI message_loop_;
+ base::MessageLoopForUI message_loop_;
ui::ScopedOleInitializer ole_initializer_;
DISALLOW_COPY_AND_ASSIGN(NativeWidgetWinTest);
diff --git a/ui/views/widget/tooltip_manager_win.cc b/ui/views/widget/tooltip_manager_win.cc
index a4664b9..c71d22e3 100644
--- a/ui/views/widget/tooltip_manager_win.cc
+++ b/ui/views/widget/tooltip_manager_win.cc
@@ -372,7 +372,7 @@ void TooltipManagerWin::ShowKeyboardTooltip(View* focused_view) {
::SetWindowPos(keyboard_tooltip_hwnd_, NULL, rect_bounds.left,
rect_bounds.top, 0, 0,
SWP_NOZORDER | SWP_NOACTIVATE | SWP_NOSIZE);
- MessageLoop::current()->PostDelayedTask(
+ base::MessageLoop::current()->PostDelayedTask(
FROM_HERE,
base::Bind(&TooltipManagerWin::DestroyKeyboardTooltipWindow,
keyboard_tooltip_factory_.GetWeakPtr(),
diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
index d79b4a5..7debccd 100644
--- a/ui/views/win/hwnd_message_handler.cc
+++ b/ui/views/win/hwnd_message_handler.cc
@@ -438,7 +438,7 @@ void HWNDMessageHandler::Close() {
// we don't destroy the window before the callback returned (as the caller
// may delete ourselves on destroy and the ATL callback would still
// dereference us when the callback returns).
- MessageLoop::current()->PostTask(
+ base::MessageLoop::current()->PostTask(
FROM_HERE,
base::Bind(&HWNDMessageHandler::CloseNow,
close_widget_factory_.GetWeakPtr()));
@@ -786,7 +786,7 @@ void HWNDMessageHandler::SchedulePaintInRect(const gfx::Rect& rect) {
// windows, so we schedule a redraw manually using a task, since those never
// seem to be starved. Also, wtf.
if (!paint_layered_window_factory_.HasWeakPtrs()) {
- MessageLoop::current()->PostTask(
+ base::MessageLoop::current()->PostTask(
FROM_HERE,
base::Bind(&HWNDMessageHandler::RedrawLayeredWindowContents,
paint_layered_window_factory_.GetWeakPtr()));
@@ -870,7 +870,7 @@ LRESULT HWNDMessageHandler::OnWndProc(UINT message,
if (delegate_)
delegate_->PostHandleMSG(message, w_param, l_param);
if (message == WM_NCDESTROY) {
- MessageLoopForUI::current()->RemoveObserver(this);
+ base::MessageLoopForUI::current()->RemoveObserver(this);
if (delegate_)
delegate_->HandleDestroyed();
}
@@ -1272,7 +1272,7 @@ LRESULT HWNDMessageHandler::OnCreate(CREATESTRUCT* create_struct) {
// aggressively if the contents of our window become invalid. Unfortunately
// WM_PAINT messages are starved and we get flickery redrawing when resizing
// if we do not do this.
- MessageLoopForUI::current()->AddObserver(this);
+ base::MessageLoopForUI::current()->AddObserver(this);
delegate_->HandleCreate();
@@ -2078,7 +2078,7 @@ void HWNDMessageHandler::OnWindowPosChanging(WINDOWPOS* window_pos) {
// and send us further updates.
ignore_window_pos_changes_ = true;
DCHECK(!ignore_pos_changes_factory_.HasWeakPtrs());
- MessageLoop::current()->PostTask(
+ base::MessageLoop::current()->PostTask(
FROM_HERE,
base::Bind(&HWNDMessageHandler::StopIgnoringPosChanges,
ignore_pos_changes_factory_.GetWeakPtr()));
diff --git a/ui/views/win/hwnd_message_handler.h b/ui/views/win/hwnd_message_handler.h
index e455baa..567e32f 100644
--- a/ui/views/win/hwnd_message_handler.h
+++ b/ui/views/win/hwnd_message_handler.h
@@ -55,9 +55,10 @@ const int WM_NCUAHDRAWFRAME = 0xAF;
// used by both a views::NativeWidget and an aura::RootWindowHost
// implementation.
// TODO(beng): This object should eventually *become* the WindowImpl.
-class VIEWS_EXPORT HWNDMessageHandler : public ui::WindowImpl,
- public internal::InputMethodDelegate,
- public MessageLoopForUI::Observer {
+class VIEWS_EXPORT HWNDMessageHandler :
+ public ui::WindowImpl,
+ public internal::InputMethodDelegate,
+ public base::MessageLoopForUI::Observer {
public:
explicit HWNDMessageHandler(HWNDMessageHandlerDelegate* delegate);
~HWNDMessageHandler();