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


CrOS-Libchrome-Original-Commit: d57905e9d64d545c597ba17aa0bea785e3e36af7
diff --git a/base/message_loop/message_loop.h b/base/message_loop/message_loop.h
index 74eddaf..59c6cdc 100644
--- a/base/message_loop/message_loop.h
+++ b/base/message_loop/message_loop.h
@@ -25,8 +25,9 @@
 #include "base/time/time.h"
 #include "base/tracking_info.h"
 
-// TODO(sky): these includes should not be necessary. Nuke them.
 #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"
 #elif defined(OS_IOS)
 #include "base/message_loop/message_pump_io_ios.h"
@@ -52,6 +53,7 @@
 namespace base {
 
 class HistogramBase;
+class MessagePumpDispatcher;
 class MessagePumpObserver;
 class RunLoop;
 class ThreadTaskRunnerHandle;
@@ -95,6 +97,7 @@
  public:
 
 #if defined(USE_AURA)
+  typedef MessagePumpDispatcher Dispatcher;
   typedef MessagePumpObserver Observer;
 #elif defined(USE_GTK_MESSAGE_PUMP)
   typedef MessagePumpGdkObserver Observer;
diff --git a/base/run_loop.cc b/base/run_loop.cc
index fccd28e..45723bb 100644
--- a/base/run_loop.cc
+++ b/base/run_loop.cc
@@ -6,10 +6,6 @@
 
 #include "base/bind.h"
 
-#if defined(USE_AURA)
-#include "base/message_loop/message_pump_dispatcher.h"
-#endif
-
 namespace base {
 
 RunLoop::RunLoop()
@@ -27,7 +23,7 @@
 }
 
 #if defined(USE_AURA)
-RunLoop::RunLoop(MessagePumpDispatcher* dispatcher)
+RunLoop::RunLoop(MessageLoop::Dispatcher* dispatcher)
     : loop_(MessageLoop::current()),
       previous_run_loop_(NULL),
       dispatcher_(dispatcher),
diff --git a/base/run_loop.h b/base/run_loop.h
index 5ad92c6..112bb79 100644
--- a/base/run_loop.h
+++ b/base/run_loop.h
@@ -15,10 +15,6 @@
 class MessagePumpForUI;
 #endif
 
-#if defined(USE_AURA)
-class MessagePumpDispatcher;
-#endif
-
 #if defined(OS_IOS)
 class MessagePumpUIApplication;
 #endif
@@ -32,12 +28,12 @@
  public:
   RunLoop();
 #if defined(USE_AURA)
-  explicit RunLoop(MessagePumpDispatcher* dispatcher);
+  explicit RunLoop(MessageLoop::Dispatcher* dispatcher);
 #endif
   ~RunLoop();
 
 #if defined(USE_AURA)
-  void set_dispatcher(MessagePumpDispatcher* dispatcher) {
+  void set_dispatcher(MessageLoop::Dispatcher* dispatcher) {
     dispatcher_ = dispatcher;
   }
 #endif
@@ -100,7 +96,7 @@
   RunLoop* previous_run_loop_;
 
 #if defined(USE_AURA)
-  MessagePumpDispatcher* dispatcher_;
+  MessageLoop::Dispatcher* dispatcher_;
 #endif
 
   // Used to count how many nested Run() invocations are on the stack.