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

Unified Diff: base/message_loop/message_loop.h

Issue 23450020: ccameron's https://codereview.chromium.org/23191007 with some changes to work (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 3 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 | « no previous file | base/message_loop/message_loop.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/message_loop/message_loop.h
diff --git a/base/message_loop/message_loop.h b/base/message_loop/message_loop.h
index 5326de76c9fd432fe4e3368b6bf7626658a684bc..6b19c36f3ea05f7c83c865e3bb00e4ad083f20ed 100644
--- a/base/message_loop/message_loop.h
+++ b/base/message_loop/message_loop.h
@@ -44,6 +44,9 @@
#else
#define USE_GTK_MESSAGE_PUMP
#include "base/message_loop/message_pump_gtk.h"
+#if defined(TOOLKIT_GTK)
+#include "base/message_loop/message_pump_x11.h"
+#endif
#endif
#endif
@@ -111,6 +114,11 @@ class BASE_EXPORT MessageLoop : public MessagePump::Delegate {
// This type of ML also supports native UI events (e.g., Windows messages).
// See also MessageLoopForUI.
//
+ // TYPE_UI_GPU
+ // This type of ML also supports native UI events for use in the GPU
+ // process. On Linux this will always be an X11 ML (as compared with the
+ // sometimes-GTK ML in the browser).
+ //
// TYPE_IO
// This type of ML also supports asynchronous IO. See also
// MessageLoopForIO.
@@ -124,6 +132,9 @@ class BASE_EXPORT MessageLoop : public MessagePump::Delegate {
enum Type {
TYPE_DEFAULT,
TYPE_UI,
+#if defined(TOOLKIT_GTK)
+ TYPE_GPU,
+#endif
TYPE_IO,
#if defined(OS_ANDROID)
TYPE_JAVA,
@@ -417,6 +428,13 @@ class BASE_EXPORT MessageLoop : public MessagePump::Delegate {
MessagePumpLibevent* pump_libevent() {
return static_cast<MessagePumpLibevent*>(pump_.get());
}
+#if defined(TOOLKIT_GTK)
+ friend class MessagePumpX11;
+ MessagePumpX11* pump_gpu() {
+ DCHECK_EQ(TYPE_GPU, type());
+ return static_cast<MessagePumpX11*>(pump_.get());
+ }
+#endif
#endif
scoped_ptr<MessagePump> pump_;
@@ -598,7 +616,7 @@ class BASE_EXPORT MessageLoopForUI : public MessageLoop {
#endif
protected:
-#if defined(USE_AURA) && defined(USE_X11) && !defined(OS_NACL)
+#if defined(USE_X11)
friend class MessagePumpX11;
#endif
#if defined(USE_OZONE) && !defined(OS_NACL)
« no previous file with comments | « no previous file | base/message_loop/message_loop.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698