Remove unnecessary uses of aura::Env::GetDispatcher

Avoid using aura::Env::GetDispatcher() as the dispatcher for new instances of
base::RunLoop()s, since for both Windows and X11, it's the same as the message-pump.

This patch also removes some non-aura views code, and some unnecessary USE_AURA ifdefs.

R=darin@chromium.org, sky@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@249105 0039d316-1c4b-4281-b951-d872f2087c98


CrOS-Libchrome-Original-Commit: 42968f7ecad14b81cf9187d2b3e7fbb27b93808d
diff --git a/base/message_loop/message_loop.cc b/base/message_loop/message_loop.cc
index bbf7cd3..689f0d9 100644
--- a/base/message_loop/message_loop.cc
+++ b/base/message_loop/message_loop.cc
@@ -386,8 +386,7 @@
 
   StartHistogrammer();
 
-#if !defined(OS_MACOSX) && !defined(OS_ANDROID) && \
-    !defined(USE_GTK_MESSAGE_PUMP)
+#if defined(USE_AURA)
   if (run_loop_->dispatcher_ && type() == TYPE_UI) {
     static_cast<MessagePumpForUI*>(pump_.get())->
         RunWithDispatcher(this, run_loop_->dispatcher_);
diff --git a/base/run_loop.h b/base/run_loop.h
index 5ad92c6..d832770 100644
--- a/base/run_loop.h
+++ b/base/run_loop.h
@@ -36,12 +36,6 @@
 #endif
   ~RunLoop();
 
-#if defined(USE_AURA)
-  void set_dispatcher(MessagePumpDispatcher* dispatcher) {
-    dispatcher_ = dispatcher;
-  }
-#endif
-
   // Run the current MessageLoop. This blocks until Quit is called. Before
   // calling Run, be sure to grab an AsWeakPtr or the QuitClosure in order to
   // stop the MessageLoop asynchronously. MessageLoop::Quit and QuitNow will