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

Unified Diff: base/message_pump_aurax11.cc

Issue 10828133: Desktop Aura: Allow tab drags out of window. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Cleanup Created 8 years, 4 months 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
« no previous file with comments | « base/message_pump_aurax11.h ('k') | chrome/browser/ui/views/tabs/tab_drag_controller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/message_pump_aurax11.cc
diff --git a/base/message_pump_aurax11.cc b/base/message_pump_aurax11.cc
index 10f95cb3767d9251659438c177257c0b429966c7..7f47fa675fe6e655c403f6415704aa0d7ccf67a4 100644
--- a/base/message_pump_aurax11.cc
+++ b/base/message_pump_aurax11.cc
@@ -139,6 +139,12 @@ void MessagePumpAuraX11::SetDefaultDispatcher(
g_default_dispatcher = dispatcher;
}
+// static
+MessagePumpAuraX11* MessagePumpAuraX11::Current() {
+ MessageLoopForUI* loop = MessageLoopForUI::current();
+ return static_cast<MessagePumpAuraX11*>(loop->pump_ui());
+}
+
bool MessagePumpAuraX11::DispatchXEvents() {
Display* display = GetDefaultXDisplay();
DCHECK(display);
@@ -156,6 +162,23 @@ bool MessagePumpAuraX11::DispatchXEvents() {
return TRUE;
}
+void MessagePumpAuraX11::BlockUntilWindowMapped(unsigned long window) {
+ XEvent event;
+
+ Display* display = GetDefaultXDisplay();
+ DCHECK(display);
+
+ MessagePumpDispatcher* dispatcher =
+ GetDispatcher() ? GetDispatcher() : g_default_dispatcher;
+
+ do {
+ // Block until there's a message of |event_mask| type on |w|. Then remove
+ // it from the queue and stuff it in |event|.
+ XWindowEvent(display, window, StructureNotifyMask, &event);
+ ProcessXEvent(dispatcher, &event);
+ } while (event.type != MapNotify);
+}
+
MessagePumpAuraX11::~MessagePumpAuraX11() {
g_source_destroy(x_source_);
g_source_unref(x_source_);
« no previous file with comments | « base/message_pump_aurax11.h ('k') | chrome/browser/ui/views/tabs/tab_drag_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698