Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(688)

Unified Diff: ui/aura/desktop.cc

Issue 8635014: DefaultDispatcher for MessagePumpX (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: " Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« base/message_pump_x.cc ('K') | « base/message_pump_x.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/desktop.cc
diff --git a/ui/aura/desktop.cc b/ui/aura/desktop.cc
index a4aa58e1bd8c7bd611e005163bd88439227e22ed..0ccb40bf6af8675c37e5c610b3e7c96739b32806 100644
--- a/ui/aura/desktop.cc
+++ b/ui/aura/desktop.cc
@@ -32,6 +32,10 @@
#include "ui/gfx/compositor/compositor_cc.h"
#endif
+#if defined(USE_X11)
+#include "base/message_pump_x.h"
+#endif
+
using std::string;
using std::vector;
@@ -132,9 +136,16 @@ Desktop::Desktop()
host_->GetSize());
}
DCHECK(compositor_.get());
+#if defined(USE_X11)
+ base::MessagePumpX::SetDefaultDispatcher(host_.get());
+#endif
}
Desktop::~Desktop() {
+#if defined(USE_X11)
+ base::MessagePumpX::SetDefaultDispatcher(NULL);
+#endif
+
in_destructor_ = true;
#ifdef USE_WEBKIT_COMPOSITOR
if (!ui::Compositor::compositor_factory())
@@ -188,7 +199,7 @@ void Desktop::SetCursor(gfx::NativeCursor cursor) {
void Desktop::Run() {
ShowDesktop();
- MessageLoopForUI::current()->RunWithDispatcher(host_.get());
+ MessageLoopForUI::current()->Run();
}
void Desktop::Draw() {
« base/message_pump_x.cc ('K') | « base/message_pump_x.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698