Commit d57905e9 authored by sky@chromium.org's avatar sky@chromium.org

Revert 245226 "Nukes MessageLoop::Dispatcher"

> Nukes MessageLoop::Dispatcher
> 
> There is no point in this typedef now that MessagePumpDispatcher is
> its own class.
> 
> BUG=none
> TEST=none
> R=ben@chromium.org, darin@chromium.org
> 
> Review URL: https://codereview.chromium.org/139593002

TBR=sky@chromium.org

Review URL: https://codereview.chromium.org/138433008

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@245239 0039d316-1c4b-4281-b951-d872f2087c98
parent 93f3ad26
...@@ -67,7 +67,7 @@ bool IsPossibleAcceleratorNotForMenu(const ui::KeyEvent& key_event) { ...@@ -67,7 +67,7 @@ bool IsPossibleAcceleratorNotForMenu(const ui::KeyEvent& key_event) {
} // namespace } // namespace
AcceleratorDispatcher::AcceleratorDispatcher( AcceleratorDispatcher::AcceleratorDispatcher(
base::MessagePumpDispatcher* nested_dispatcher, base::MessageLoop::Dispatcher* nested_dispatcher,
aura::Window* associated_window) aura::Window* associated_window)
: nested_dispatcher_(nested_dispatcher), : nested_dispatcher_(nested_dispatcher),
associated_window_(associated_window) { associated_window_(associated_window) {
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
#define ASH_ACCELERATORS_ACCELERATOR_DISPATCHER_H_ #define ASH_ACCELERATORS_ACCELERATOR_DISPATCHER_H_
#include "ash/ash_export.h" #include "ash/ash_export.h"
#include "base/message_loop/message_pump_dispatcher.h" #include "base/message_loop/message_loop.h"
#include "ui/aura/window.h" #include "ui/aura/window.h"
#include "ui/aura/window_observer.h" #include "ui/aura/window_observer.h"
...@@ -19,21 +19,21 @@ namespace ash { ...@@ -19,21 +19,21 @@ namespace ash {
// TODO(pkotwicz): Port AcceleratorDispatcher to mac. // TODO(pkotwicz): Port AcceleratorDispatcher to mac.
// TODO(pkotwicz): Add support for a |nested_dispatcher| which sends // TODO(pkotwicz): Add support for a |nested_dispatcher| which sends
// events to a system IME. // events to a system IME.
class ASH_EXPORT AcceleratorDispatcher : public base::MessagePumpDispatcher, class ASH_EXPORT AcceleratorDispatcher : public base::MessageLoop::Dispatcher,
public aura::WindowObserver { public aura::WindowObserver {
public: public:
AcceleratorDispatcher(base::MessagePumpDispatcher* nested_dispatcher, AcceleratorDispatcher(base::MessageLoop::Dispatcher* nested_dispatcher,
aura::Window* associated_window); aura::Window* associated_window);
virtual ~AcceleratorDispatcher(); virtual ~AcceleratorDispatcher();
// MessagePumpDispatcher overrides: // MessageLoop::Dispatcher overrides:
virtual bool Dispatch(const base::NativeEvent& event) OVERRIDE; virtual bool Dispatch(const base::NativeEvent& event) OVERRIDE;
// aura::WindowObserver overrides: // aura::WindowObserver overrides:
virtual void OnWindowDestroying(aura::Window* window) OVERRIDE; virtual void OnWindowDestroying(aura::Window* window) OVERRIDE;
private: private:
base::MessagePumpDispatcher* nested_dispatcher_; base::MessageLoop::Dispatcher* nested_dispatcher_;
// Window associated with |nested_dispatcher_| which is used to determine // Window associated with |nested_dispatcher_| which is used to determine
// whether the |nested_dispatcher_| is allowed to receive events. // whether the |nested_dispatcher_| is allowed to receive events.
......
...@@ -17,7 +17,7 @@ NestedDispatcherController::~NestedDispatcherController() { ...@@ -17,7 +17,7 @@ NestedDispatcherController::~NestedDispatcherController() {
} }
void NestedDispatcherController::RunWithDispatcher( void NestedDispatcherController::RunWithDispatcher(
base::MessagePumpDispatcher* nested_dispatcher, base::MessageLoop::Dispatcher* nested_dispatcher,
aura::Window* associated_window, aura::Window* associated_window,
bool nestable_tasks_allowed) { bool nestable_tasks_allowed) {
base::MessageLoopForUI* loop = base::MessageLoopForUI::current(); base::MessageLoopForUI* loop = base::MessageLoopForUI::current();
......
...@@ -22,7 +22,7 @@ class ASH_EXPORT NestedDispatcherController ...@@ -22,7 +22,7 @@ class ASH_EXPORT NestedDispatcherController
NestedDispatcherController(); NestedDispatcherController();
virtual ~NestedDispatcherController(); virtual ~NestedDispatcherController();
virtual void RunWithDispatcher(base::MessagePumpDispatcher* dispatcher, virtual void RunWithDispatcher(base::MessageLoop::Dispatcher* dispatcher,
aura::Window* associated_window, aura::Window* associated_window,
bool nestable_tasks_allowed) OVERRIDE; bool nestable_tasks_allowed) OVERRIDE;
......
...@@ -28,7 +28,7 @@ namespace test { ...@@ -28,7 +28,7 @@ namespace test {
namespace { namespace {
class MockDispatcher : public base::MessagePumpDispatcher { class MockDispatcher : public base::MessageLoop::Dispatcher {
public: public:
MockDispatcher() : num_key_events_dispatched_(0) { MockDispatcher() : num_key_events_dispatched_(0) {
} }
......
...@@ -25,8 +25,9 @@ ...@@ -25,8 +25,9 @@
#include "base/time/time.h" #include "base/time/time.h"
#include "base/tracking_info.h" #include "base/tracking_info.h"
// TODO(sky): these includes should not be necessary. Nuke them.
#if defined(OS_WIN) #if defined(OS_WIN)
// We need this to declare base::MessagePumpWin::Dispatcher, which we should
// really just eliminate.
#include "base/message_loop/message_pump_win.h" #include "base/message_loop/message_pump_win.h"
#elif defined(OS_IOS) #elif defined(OS_IOS)
#include "base/message_loop/message_pump_io_ios.h" #include "base/message_loop/message_pump_io_ios.h"
...@@ -52,6 +53,7 @@ ...@@ -52,6 +53,7 @@
namespace base { namespace base {
class HistogramBase; class HistogramBase;
class MessagePumpDispatcher;
class MessagePumpObserver; class MessagePumpObserver;
class RunLoop; class RunLoop;
class ThreadTaskRunnerHandle; class ThreadTaskRunnerHandle;
...@@ -95,6 +97,7 @@ class BASE_EXPORT MessageLoop : public MessagePump::Delegate { ...@@ -95,6 +97,7 @@ class BASE_EXPORT MessageLoop : public MessagePump::Delegate {
public: public:
#if defined(USE_AURA) #if defined(USE_AURA)
typedef MessagePumpDispatcher Dispatcher;
typedef MessagePumpObserver Observer; typedef MessagePumpObserver Observer;
#elif defined(USE_GTK_MESSAGE_PUMP) #elif defined(USE_GTK_MESSAGE_PUMP)
typedef MessagePumpGdkObserver Observer; typedef MessagePumpGdkObserver Observer;
......
...@@ -6,10 +6,6 @@ ...@@ -6,10 +6,6 @@
#include "base/bind.h" #include "base/bind.h"
#if defined(USE_AURA)
#include "base/message_loop/message_pump_dispatcher.h"
#endif
namespace base { namespace base {
RunLoop::RunLoop() RunLoop::RunLoop()
...@@ -27,7 +23,7 @@ RunLoop::RunLoop() ...@@ -27,7 +23,7 @@ RunLoop::RunLoop()
} }
#if defined(USE_AURA) #if defined(USE_AURA)
RunLoop::RunLoop(MessagePumpDispatcher* dispatcher) RunLoop::RunLoop(MessageLoop::Dispatcher* dispatcher)
: loop_(MessageLoop::current()), : loop_(MessageLoop::current()),
previous_run_loop_(NULL), previous_run_loop_(NULL),
dispatcher_(dispatcher), dispatcher_(dispatcher),
......
...@@ -15,10 +15,6 @@ namespace base { ...@@ -15,10 +15,6 @@ namespace base {
class MessagePumpForUI; class MessagePumpForUI;
#endif #endif
#if defined(USE_AURA)
class MessagePumpDispatcher;
#endif
#if defined(OS_IOS) #if defined(OS_IOS)
class MessagePumpUIApplication; class MessagePumpUIApplication;
#endif #endif
...@@ -32,12 +28,12 @@ class BASE_EXPORT RunLoop { ...@@ -32,12 +28,12 @@ class BASE_EXPORT RunLoop {
public: public:
RunLoop(); RunLoop();
#if defined(USE_AURA) #if defined(USE_AURA)
explicit RunLoop(MessagePumpDispatcher* dispatcher); explicit RunLoop(MessageLoop::Dispatcher* dispatcher);
#endif #endif
~RunLoop(); ~RunLoop();
#if defined(USE_AURA) #if defined(USE_AURA)
void set_dispatcher(MessagePumpDispatcher* dispatcher) { void set_dispatcher(MessageLoop::Dispatcher* dispatcher) {
dispatcher_ = dispatcher; dispatcher_ = dispatcher;
} }
#endif #endif
...@@ -100,7 +96,7 @@ class BASE_EXPORT RunLoop { ...@@ -100,7 +96,7 @@ class BASE_EXPORT RunLoop {
RunLoop* previous_run_loop_; RunLoop* previous_run_loop_;
#if defined(USE_AURA) #if defined(USE_AURA)
MessagePumpDispatcher* dispatcher_; MessageLoop::Dispatcher* dispatcher_;
#endif #endif
// Used to count how many nested Run() invocations are on the stack. // Used to count how many nested Run() invocations are on the stack.
......
...@@ -8,7 +8,6 @@ ...@@ -8,7 +8,6 @@
#include "base/compiler_specific.h" #include "base/compiler_specific.h"
#include "base/memory/ref_counted.h" #include "base/memory/ref_counted.h"
#include "base/message_loop/message_loop.h" #include "base/message_loop/message_loop.h"
#include "base/message_loop/message_pump_dispatcher.h"
#include "base/run_loop.h" #include "base/run_loop.h"
#include "chrome/browser/browser_process.h" #include "chrome/browser/browser_process.h"
#include "chrome/browser/ui/views/constrained_window_views.h" #include "chrome/browser/ui/views/constrained_window_views.h"
...@@ -38,7 +37,7 @@ namespace { ...@@ -38,7 +37,7 @@ namespace {
// destroyed before a box in an outer-loop. So to avoid this, ref-counting is // 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. // used so that the SimpleMessageBoxViews gets deleted at the right time.
class SimpleMessageBoxViews : public views::DialogDelegate, class SimpleMessageBoxViews : public views::DialogDelegate,
public base::MessagePumpDispatcher, public base::MessageLoop::Dispatcher,
public base::RefCounted<SimpleMessageBoxViews> { public base::RefCounted<SimpleMessageBoxViews> {
public: public:
SimpleMessageBoxViews(const base::string16& title, SimpleMessageBoxViews(const base::string16& title,
...@@ -64,7 +63,7 @@ class SimpleMessageBoxViews : public views::DialogDelegate, ...@@ -64,7 +63,7 @@ class SimpleMessageBoxViews : public views::DialogDelegate,
virtual views::Widget* GetWidget() OVERRIDE; virtual views::Widget* GetWidget() OVERRIDE;
virtual const views::Widget* GetWidget() const OVERRIDE; virtual const views::Widget* GetWidget() const OVERRIDE;
// Overridden from MessagePumpDispatcher: // Overridden from MessageLoop::Dispatcher:
virtual bool Dispatch(const base::NativeEvent& event) OVERRIDE; virtual bool Dispatch(const base::NativeEvent& event) OVERRIDE;
private: private:
......
...@@ -13,7 +13,6 @@ ...@@ -13,7 +13,6 @@
#include "base/event_types.h" #include "base/event_types.h"
#include "base/memory/scoped_ptr.h" #include "base/memory/scoped_ptr.h"
#include "base/message_loop/message_loop.h" #include "base/message_loop/message_loop.h"
#include "base/message_loop/message_pump_dispatcher.h"
#include "base/observer_list.h" #include "base/observer_list.h"
#include "base/timer/timer.h" #include "base/timer/timer.h"
#include "chromeos/chromeos_export.h" #include "chromeos/chromeos_export.h"
...@@ -65,7 +64,7 @@ enum HDCPState { ...@@ -65,7 +64,7 @@ enum HDCPState {
// This class interacts directly with the underlying Xrandr API to manipulate // This class interacts directly with the underlying Xrandr API to manipulate
// CTRCs and Outputs. // CTRCs and Outputs.
class CHROMEOS_EXPORT OutputConfigurator class CHROMEOS_EXPORT OutputConfigurator
: public base::MessagePumpDispatcher, : public base::MessageLoop::Dispatcher,
public base::MessagePumpObserver { public base::MessagePumpObserver {
public: public:
typedef uint64_t OutputProtectionClientId; typedef uint64_t OutputProtectionClientId;
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
#ifndef UI_AURA_CLIENT_DISPATCHER_CLIENT_H_ #ifndef UI_AURA_CLIENT_DISPATCHER_CLIENT_H_
#define UI_AURA_CLIENT_DISPATCHER_CLIENT_H_ #define UI_AURA_CLIENT_DISPATCHER_CLIENT_H_
#include "base/message_loop/message_pump_dispatcher.h" #include "base/message_loop/message_loop.h"
#include "ui/aura/aura_export.h" #include "ui/aura/aura_export.h"
#include "ui/aura/window.h" #include "ui/aura/window.h"
...@@ -16,7 +16,7 @@ namespace client { ...@@ -16,7 +16,7 @@ namespace client {
// An interface implemented by an object which handles nested dispatchers. // An interface implemented by an object which handles nested dispatchers.
class AURA_EXPORT DispatcherClient { class AURA_EXPORT DispatcherClient {
public: public:
virtual void RunWithDispatcher(base::MessagePumpDispatcher* dispatcher, virtual void RunWithDispatcher(base::MessageLoop::Dispatcher* dispatcher,
aura::Window* associated_window, aura::Window* associated_window,
bool nestable_tasks_allowed) = 0; bool nestable_tasks_allowed) = 0;
}; };
......
...@@ -4,16 +4,16 @@ ...@@ -4,16 +4,16 @@
#include "base/basictypes.h" #include "base/basictypes.h"
#include "base/compiler_specific.h" #include "base/compiler_specific.h"
#include "base/message_loop/message_pump_dispatcher.h" #include "base/message_loop/message_loop.h"
namespace aura { namespace aura {
class DispatcherWin : public base::MessagePumpDispatcher { class DispatcherWin : public base::MessageLoop::Dispatcher {
public: public:
DispatcherWin() {} DispatcherWin() {}
virtual ~DispatcherWin() {} virtual ~DispatcherWin() {}
// Overridden from MessagePumpDispatcher: // Overridden from MessageLoop::Dispatcher:
virtual bool Dispatch(const base::NativeEvent& event) OVERRIDE; virtual bool Dispatch(const base::NativeEvent& event) OVERRIDE;
private: private:
...@@ -26,7 +26,7 @@ bool DispatcherWin::Dispatch(const base::NativeEvent& msg) { ...@@ -26,7 +26,7 @@ bool DispatcherWin::Dispatch(const base::NativeEvent& msg) {
return true; return true;
} }
base::MessagePumpDispatcher* CreateDispatcher() { base::MessageLoop::Dispatcher* CreateDispatcher() {
return new DispatcherWin; return new DispatcherWin;
} }
......
...@@ -76,7 +76,7 @@ bool Env::IsMouseButtonDown() const { ...@@ -76,7 +76,7 @@ bool Env::IsMouseButtonDown() const {
mouse_button_flags_ != 0; mouse_button_flags_ != 0;
} }
base::MessagePumpDispatcher* Env::GetDispatcher() { base::MessageLoop::Dispatcher* Env::GetDispatcher() {
#if defined(USE_X11) #if defined(USE_X11)
return base::MessagePumpX11::Current(); return base::MessagePumpX11::Current();
#else #else
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
#define UI_AURA_ENV_H_ #define UI_AURA_ENV_H_
#include "base/memory/scoped_ptr.h" #include "base/memory/scoped_ptr.h"
#include "base/message_loop/message_pump_dispatcher.h" #include "base/message_loop/message_loop.h"
#include "base/observer_list.h" #include "base/observer_list.h"
#include "ui/aura/aura_export.h" #include "ui/aura/aura_export.h"
#include "ui/events/event_handler.h" #include "ui/events/event_handler.h"
...@@ -29,7 +29,7 @@ class RootWindow; ...@@ -29,7 +29,7 @@ class RootWindow;
class Window; class Window;
// Creates a platform-specific native event dispatcher. // Creates a platform-specific native event dispatcher.
base::MessagePumpDispatcher* CreateDispatcher(); base::MessageLoop::Dispatcher* CreateDispatcher();
// A singleton object that tracks general state within Aura. // A singleton object that tracks general state within Aura.
// TODO(beng): manage RootWindows. // TODO(beng): manage RootWindows.
...@@ -66,7 +66,7 @@ class AURA_EXPORT Env : public ui::EventTarget { ...@@ -66,7 +66,7 @@ class AURA_EXPORT Env : public ui::EventTarget {
// Returns the native event dispatcher. The result should only be passed to // Returns the native event dispatcher. The result should only be passed to
// base::RunLoop(dispatcher), or used to dispatch an event by // base::RunLoop(dispatcher), or used to dispatch an event by
// |Dispatch(const NativeEvent&)| on it. It must never be stored. // |Dispatch(const NativeEvent&)| on it. It must never be stored.
base::MessagePumpDispatcher* GetDispatcher(); base::MessageLoop::Dispatcher* GetDispatcher();
// Invoked by RootWindow when its host is activated. // Invoked by RootWindow when its host is activated.
void RootWindowActivated(RootWindow* root_window); void RootWindowActivated(RootWindow* root_window);
...@@ -91,7 +91,7 @@ class AURA_EXPORT Env : public ui::EventTarget { ...@@ -91,7 +91,7 @@ class AURA_EXPORT Env : public ui::EventTarget {
virtual ui::EventTargeter* GetEventTargeter() OVERRIDE; virtual ui::EventTargeter* GetEventTargeter() OVERRIDE;
ObserverList<EnvObserver> observers_; ObserverList<EnvObserver> observers_;
scoped_ptr<base::MessagePumpDispatcher> dispatcher_; scoped_ptr<base::MessageLoop::Dispatcher> dispatcher_;
static Env* instance_; static Env* instance_;
int mouse_button_flags_; int mouse_button_flags_;
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
#include <vector> #include <vector>
#include "base/memory/scoped_ptr.h" #include "base/memory/scoped_ptr.h"
#include "base/message_loop/message_pump_dispatcher.h" #include "base/message_loop/message_loop.h"
#include "ui/aura/window_tree_host.h" #include "ui/aura/window_tree_host.h"
#include "ui/gfx/insets.h" #include "ui/gfx/insets.h"
#include "ui/gfx/rect.h" #include "ui/gfx/rect.h"
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
namespace aura { namespace aura {
class WindowTreeHostOzone : public WindowTreeHost, class WindowTreeHostOzone : public WindowTreeHost,
public base::MessagePumpDispatcher { public base::MessageLoop::Dispatcher {
public: public:
explicit WindowTreeHostOzone(const gfx::Rect& bounds); explicit WindowTreeHostOzone(const gfx::Rect& bounds);
virtual ~WindowTreeHostOzone(); virtual ~WindowTreeHostOzone();
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
#undef RootWindow #undef RootWindow
#include "base/memory/scoped_ptr.h" #include "base/memory/scoped_ptr.h"
#include "base/message_loop/message_pump_dispatcher.h" #include "base/message_loop/message_loop.h"
#include "ui/aura/aura_export.h" #include "ui/aura/aura_export.h"
#include "ui/aura/env_observer.h" #include "ui/aura/env_observer.h"
#include "ui/aura/window_tree_host.h" #include "ui/aura/window_tree_host.h"
...@@ -34,7 +34,7 @@ class TouchEventCalibrate; ...@@ -34,7 +34,7 @@ class TouchEventCalibrate;
} }
class AURA_EXPORT WindowTreeHostX11 : public WindowTreeHost, class AURA_EXPORT WindowTreeHostX11 : public WindowTreeHost,
public base::MessagePumpDispatcher, public base::MessageLoop::Dispatcher,
public ui::EventSource, public ui::EventSource,
public EnvObserver { public EnvObserver {
public: public:
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
#include "base/memory/scoped_ptr.h" #include "base/memory/scoped_ptr.h"
#include "base/memory/scoped_vector.h" #include "base/memory/scoped_vector.h"
#include "base/message_loop/message_pump_dispatcher.h" #include "base/message_loop/message_loop.h"
#include "base/posix/eintr_wrapper.h" #include "base/posix/eintr_wrapper.h"
#include "base/run_loop.h" #include "base/run_loop.h"
#include "base/time/time.h" #include "base/time/time.h"
...@@ -33,7 +33,7 @@ static int SetNonBlocking(int fd) { ...@@ -33,7 +33,7 @@ static int SetNonBlocking(int fd) {
namespace ui { namespace ui {
class MockTouchEventConverterEvdev : public TouchEventConverterEvdev, class MockTouchEventConverterEvdev : public TouchEventConverterEvdev,
public base::MessagePumpDispatcher { public base::MessageLoop::Dispatcher {
public: public:
MockTouchEventConverterEvdev(int a, int b); MockTouchEventConverterEvdev(int a, int b);
virtual ~MockTouchEventConverterEvdev() {}; virtual ~MockTouchEventConverterEvdev() {};
......
...@@ -2295,7 +2295,7 @@ View* MenuController::GetActiveMouseView() { ...@@ -2295,7 +2295,7 @@ View* MenuController::GetActiveMouseView() {
void MenuController::SetExitType(ExitType type) { void MenuController::SetExitType(ExitType type) {
exit_type_ = type; exit_type_ = type;
// Exit nested message loops as soon as possible. We do this as // Exit nested message loops as soon as possible. We do this as
// MessagePumpDispatcher is only invoked before native events, which means // MessageLoop::Dispatcher is only invoked before native events, which means
// its entirely possible for a Widget::CloseNow() task to be processed before // its entirely possible for a Widget::CloseNow() task to be processed before
// the next native message. By using QuitNow() we ensures the nested message // the next native message. By using QuitNow() we ensures the nested message
// loop returns as soon as possible and avoids having deleted views classes // loop returns as soon as possible and avoids having deleted views classes
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
#include "base/compiler_specific.h" #include "base/compiler_specific.h"
#include "base/memory/scoped_ptr.h" #include "base/memory/scoped_ptr.h"
#include "base/message_loop/message_pump_dispatcher.h" #include "base/message_loop/message_loop.h"
#include "base/timer/timer.h" #include "base/timer/timer.h"
#include "ui/events/event_constants.h" #include "ui/events/event_constants.h"
#include "ui/views/controls/menu/menu_delegate.h" #include "ui/views/controls/menu/menu_delegate.h"
...@@ -45,7 +45,7 @@ class MenuRunnerImpl; ...@@ -45,7 +45,7 @@ class MenuRunnerImpl;
// MenuController is used internally by the various menu classes to manage // MenuController is used internally by the various menu classes to manage
// showing, selecting and drag/drop for menus. All relevant events are // showing, selecting and drag/drop for menus. All relevant events are
// forwarded to the MenuController from SubmenuView and MenuHost. // forwarded to the MenuController from SubmenuView and MenuHost.
class VIEWS_EXPORT MenuController : public base::MessagePumpDispatcher, class VIEWS_EXPORT MenuController : public base::MessageLoop::Dispatcher,
public WidgetObserver { public WidgetObserver {
public: public:
// Enumeration of how the menu should exit. // Enumeration of how the menu should exit.
......
...@@ -10,9 +10,8 @@ ...@@ -10,9 +10,8 @@
#include <set> #include <set>
#include <vector> #include <vector>
#include "base/basictypes.h"
#include "base/compiler_specific.h" #include "base/compiler_specific.h"
#include "base/message_loop/message_pump_dispatcher.h" #include "base/message_loop/message_loop.h"
#include "ui/views/views_export.h" #include "ui/views/views_export.h"
namespace views { namespace views {
...@@ -25,7 +24,7 @@ bool VIEWS_EXPORT DispatchXEvent(XEvent* xevent); ...@@ -25,7 +24,7 @@ bool VIEWS_EXPORT DispatchXEvent(XEvent* xevent);
// This class delegates the key messages to the associated FocusManager class // This class delegates the key messages to the associated FocusManager class
// for the window that is receiving these messages for accelerator processing. // for the window that is receiving these messages for accelerator processing.
class VIEWS_EXPORT AcceleratorHandler : public base::MessagePumpDispatcher { class VIEWS_EXPORT AcceleratorHandler : public base::MessageLoop::Dispatcher {
public: public:
AcceleratorHandler(); AcceleratorHandler();
......
...@@ -13,7 +13,7 @@ DesktopDispatcherClient::DesktopDispatcherClient() {} ...@@ -13,7 +13,7 @@ DesktopDispatcherClient::DesktopDispatcherClient() {}
DesktopDispatcherClient::~DesktopDispatcherClient() {} DesktopDispatcherClient::~DesktopDispatcherClient() {}
void DesktopDispatcherClient::RunWithDispatcher( void DesktopDispatcherClient::RunWithDispatcher(
base::MessagePumpDispatcher* nested_dispatcher, base::MessageLoop::Dispatcher* nested_dispatcher,
aura::Window* associated_window, aura::Window* associated_window,
bool nestable_tasks_allowed) { bool nestable_tasks_allowed) {
// TODO(erg): This class has been copypastad from // TODO(erg): This class has been copypastad from
......
...@@ -18,7 +18,7 @@ class VIEWS_EXPORT DesktopDispatcherClient ...@@ -18,7 +18,7 @@ class VIEWS_EXPORT DesktopDispatcherClient
DesktopDispatcherClient(); DesktopDispatcherClient();
virtual ~DesktopDispatcherClient(); virtual ~DesktopDispatcherClient();
virtual void RunWithDispatcher(base::MessagePumpDispatcher* dispatcher, virtual void RunWithDispatcher(base::MessageLoop::Dispatcher* dispatcher,
aura::Window* associated_window, aura::Window* associated_window,
bool nestable_tasks_allowed) OVERRIDE; bool nestable_tasks_allowed) OVERRIDE;
......
...@@ -9,7 +9,6 @@ ...@@ -9,7 +9,6 @@
#include "base/event_types.h" #include "base/event_types.h"
#include "base/lazy_instance.h" #include "base/lazy_instance.h"
#include "base/message_loop/message_loop.h" #include "base/message_loop/message_loop.h"
#include "base/message_loop/message_pump_dispatcher.h"
#include "ui/aura/client/drag_drop_client.h" #include "ui/aura/client/drag_drop_client.h"
#include "ui/aura/client/drag_drop_delegate.h" #include "ui/aura/client/drag_drop_delegate.h"
#include "ui/aura/root_window.h" #include "ui/aura/root_window.h"
...@@ -139,7 +138,7 @@ void FindWindowFor(const gfx::Point& screen_point, ...@@ -139,7 +138,7 @@ void FindWindowFor(const gfx::Point& screen_point,
namespace views { namespace views {
class DesktopDragDropClientAuraX11::X11DragContext : class DesktopDragDropClientAuraX11::X11DragContext :
public base::MessagePumpDispatcher { public base::MessageLoop::Dispatcher {
public: public:
X11DragContext(ui::X11AtomCache* atom_cache, X11DragContext(ui::X11AtomCache* atom_cache,
::Window local_window, ::Window local_window,
...@@ -174,7 +173,7 @@ class DesktopDragDropClientAuraX11::X11DragContext : ...@@ -174,7 +173,7 @@ class DesktopDragDropClientAuraX11::X11DragContext :
int GetDragOperation() const; int GetDragOperation() const;
private: private:
// Overridden from MessagePumpDispatcher: // Overridden from MessageLoop::Dispatcher:
virtual bool Dispatch(const base::NativeEvent& event) OVERRIDE; virtual bool Dispatch(const base::NativeEvent& event) OVERRIDE;
// The atom cache owned by our parent. // The atom cache owned by our parent.
......
...@@ -1199,7 +1199,7 @@ std::list<XID>& DesktopWindowTreeHostX11::open_windows() { ...@@ -1199,7 +1199,7 @@ std::list<XID>& DesktopWindowTreeHostX11::open_windows() {
} }
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// DesktopWindowTreeHostX11, MessagePumpDispatcher implementation: // DesktopWindowTreeHostX11, MessageLoop::Dispatcher implementation:
bool DesktopWindowTreeHostX11::Dispatch(const base::NativeEvent& event) { bool DesktopWindowTreeHostX11::Dispatch(const base::NativeEvent& event) {
XEvent* xev = event; XEvent* xev = event;
......
...@@ -37,7 +37,7 @@ class X11WindowEventFilter; ...@@ -37,7 +37,7 @@ class X11WindowEventFilter;
class VIEWS_EXPORT DesktopWindowTreeHostX11 : class VIEWS_EXPORT DesktopWindowTreeHostX11 :
public DesktopWindowTreeHost, public DesktopWindowTreeHost,
public aura::WindowTreeHost, public aura::WindowTreeHost,
public base::MessagePumpDispatcher { public base::MessageLoop::Dispatcher {
public: public:
DesktopWindowTreeHostX11( DesktopWindowTreeHostX11(
internal::NativeWidgetDelegate* native_widget_delegate, internal::NativeWidgetDelegate* native_widget_delegate,
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
// Get rid of a macro from Xlib.h that conflicts with Aura's RootWindow class. // Get rid of a macro from Xlib.h that conflicts with Aura's RootWindow class.
#undef RootWindow #undef RootWindow
#include "base/message_loop/message_pump_dispatcher.h" #include "base/message_loop/message_loop.h"
#include "ui/aura/env_observer.h" #include "ui/aura/env_observer.h"
#include "ui/gfx/x/x11_atom_cache.h" #include "ui/gfx/x/x11_atom_cache.h"
#include "ui/gfx/x/x11_types.h" #include "ui/gfx/x/x11_types.h"
...@@ -22,7 +22,7 @@ namespace views { ...@@ -22,7 +22,7 @@ namespace views {
// A singleton that owns global objects related to the desktop and listens for // 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 // X11 events on the X11 root window. Destroys itself when aura::Env is
// deleted. // deleted.
class VIEWS_EXPORT X11DesktopHandler : public base::MessagePumpDispatcher, class VIEWS_EXPORT X11DesktopHandler : public base::MessageLoop::Dispatcher,
public aura::EnvObserver { public aura::EnvObserver {
public: public:
// Returns the singleton handler. // Returns the singleton handler.
...@@ -40,7 +40,7 @@ class VIEWS_EXPORT X11DesktopHandler : public base::MessagePumpDispatcher, ...@@ -40,7 +40,7 @@ class VIEWS_EXPORT X11DesktopHandler : public base::MessagePumpDispatcher,
// dispatcher. The window dispatcher sends these events to here. // dispatcher. The window dispatcher sends these events to here.
void ProcessXEvent(const base::NativeEvent& event); void ProcessXEvent(const base::NativeEvent& event);
// Overridden from MessagePumpDispatcher: // Overridden from MessageLoop::Dispatcher:
virtual bool Dispatch(const base::NativeEvent& event) OVERRIDE; virtual bool Dispatch(const base::NativeEvent& event) OVERRIDE;
// Overridden from aura::EnvObserver: // Overridden from aura::EnvObserver:
......
...@@ -57,7 +57,7 @@ X11WholeScreenMoveLoop::X11WholeScreenMoveLoop( ...@@ -57,7 +57,7 @@ X11WholeScreenMoveLoop::X11WholeScreenMoveLoop(
X11WholeScreenMoveLoop::~X11WholeScreenMoveLoop() {} X11WholeScreenMoveLoop::~X11WholeScreenMoveLoop() {}
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// DesktopWindowTreeHostLinux, MessagePumpDispatcher implementation: // DesktopWindowTreeHostLinux, MessageLoop::Dispatcher implementation:
bool X11WholeScreenMoveLoop::Dispatch(const base::NativeEvent& event) { bool X11WholeScreenMoveLoop::Dispatch(const base::NativeEvent& event) {
XEvent* xev = event; XEvent* xev = event;
......
...@@ -5,9 +5,8 @@ ...@@ -5,9 +5,8 @@
#ifndef UI_VIEWS_WIDGET_DESKTOP_AURA_X11_WHOLE_SCREEN_MOVE_LOOP_H_ #ifndef UI_VIEWS_WIDGET_DESKTOP_AURA_X11_WHOLE_SCREEN_MOVE_LOOP_H_
#define UI_VIEWS_WIDGET_DESKTOP_AURA_X11_WHOLE_SCREEN_MOVE_LOOP_H_ #define UI_VIEWS_WIDGET_DESKTOP_AURA_X11_WHOLE_SCREEN_MOVE_LOOP_H_
#include "base/callback.h"
#include "base/compiler_specific.h" #include "base/compiler_specific.h"
#include "base/message_loop/message_pump_dispatcher.h" #include "base/message_loop/message_loop.h"
#include "ui/gfx/image/image_skia.h" #include "ui/gfx/image/image_skia.h"
#include "ui/gfx/native_widget_types.h" #include "ui/gfx/native_widget_types.h"
#include "ui/gfx/vector2d_f.h" #include "ui/gfx/vector2d_f.h"
...@@ -25,12 +24,12 @@ class Widget; ...@@ -25,12 +24,12 @@ class Widget;
// Runs a nested message loop and grabs the mouse. This is used to implement // Runs a nested message loop and grabs the mouse. This is used to implement
// dragging. // dragging.
class X11WholeScreenMoveLoop : public base::MessagePumpDispatcher { class X11WholeScreenMoveLoop : public base::MessageLoop::Dispatcher {
public: public:
explicit X11WholeScreenMoveLoop(X11WholeScreenMoveLoopDelegate* delegate); explicit X11WholeScreenMoveLoop(X11WholeScreenMoveLoopDelegate* delegate);
virtual ~X11WholeScreenMoveLoop(); virtual ~X11WholeScreenMoveLoop();
// Overridden from base::MessagePumpDispatcher: // Overridden from base::MessageLoop::Dispatcher:
virtual bool Dispatch(const base::NativeEvent& event) OVERRIDE; virtual bool Dispatch(const base::NativeEvent& event) OVERRIDE;
// Runs the nested message loop. While the mouse is grabbed, use |cursor| as // Runs the nested message loop. While the mouse is grabbed, use |cursor| as
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment