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

Side by Side Diff: base/message_loop/message_loop.h

Issue 23880006: gtk: Allow building both the X11 and Gtk message-pumps for gtk. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: tot-merge 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « base/base.gypi ('k') | base/message_loop/message_pump_aurax11.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef BASE_MESSAGE_LOOP_MESSAGE_LOOP_H_ 5 #ifndef BASE_MESSAGE_LOOP_MESSAGE_LOOP_H_
6 #define BASE_MESSAGE_LOOP_MESSAGE_LOOP_H_ 6 #define BASE_MESSAGE_LOOP_MESSAGE_LOOP_H_
7 7
8 #include <queue> 8 #include <queue>
9 #include <string> 9 #include <string>
10 10
(...skipping 18 matching lines...) Expand all
29 // We need this to declare base::MessagePumpWin::Dispatcher, which we should 29 // We need this to declare base::MessagePumpWin::Dispatcher, which we should
30 // really just eliminate. 30 // really just eliminate.
31 #include "base/message_loop/message_pump_win.h" 31 #include "base/message_loop/message_pump_win.h"
32 #elif defined(OS_IOS) 32 #elif defined(OS_IOS)
33 #include "base/message_loop/message_pump_io_ios.h" 33 #include "base/message_loop/message_pump_io_ios.h"
34 #elif defined(OS_POSIX) 34 #elif defined(OS_POSIX)
35 #include "base/message_loop/message_pump_libevent.h" 35 #include "base/message_loop/message_pump_libevent.h"
36 #if !defined(OS_MACOSX) && !defined(OS_ANDROID) 36 #if !defined(OS_MACOSX) && !defined(OS_ANDROID)
37 37
38 #if defined(USE_AURA) && defined(USE_X11) && !defined(OS_NACL) 38 #if defined(USE_AURA) && defined(USE_X11) && !defined(OS_NACL)
39 #include "base/message_loop/message_pump_aurax11.h" 39 #include "base/message_loop/message_pump_x11.h"
40 #elif defined(USE_OZONE) && !defined(OS_NACL) 40 #elif defined(USE_OZONE) && !defined(OS_NACL)
41 #include "base/message_loop/message_pump_ozone.h" 41 #include "base/message_loop/message_pump_ozone.h"
42 #else 42 #else
43 #define USE_GTK_MESSAGE_PUMP 43 #define USE_GTK_MESSAGE_PUMP
44 #include "base/message_loop/message_pump_gtk.h" 44 #include "base/message_loop/message_pump_gtk.h"
45 #endif 45 #endif
46 46
47 #endif 47 #endif
48 #endif 48 #endif
49 49
(...skipping 543 matching lines...) Expand 10 before | Expand all | Expand 10 after
593 593
594 #if defined(OS_WIN) 594 #if defined(OS_WIN)
595 // Plese see MessagePumpForUI for definitions of this method. 595 // Plese see MessagePumpForUI for definitions of this method.
596 void SetMessageFilter(scoped_ptr<MessageFilter> message_filter) { 596 void SetMessageFilter(scoped_ptr<MessageFilter> message_filter) {
597 pump_ui()->SetMessageFilter(message_filter.Pass()); 597 pump_ui()->SetMessageFilter(message_filter.Pass());
598 } 598 }
599 #endif 599 #endif
600 600
601 protected: 601 protected:
602 #if defined(USE_AURA) && defined(USE_X11) && !defined(OS_NACL) 602 #if defined(USE_AURA) && defined(USE_X11) && !defined(OS_NACL)
603 friend class MessagePumpAuraX11; 603 friend class MessagePumpX11;
604 #endif 604 #endif
605 #if defined(USE_OZONE) && !defined(OS_NACL) 605 #if defined(USE_OZONE) && !defined(OS_NACL)
606 friend class MessagePumpOzone; 606 friend class MessagePumpOzone;
607 #endif 607 #endif
608 608
609 // TODO(rvargas): Make this platform independent. 609 // TODO(rvargas): Make this platform independent.
610 MessagePumpForUI* pump_ui() { 610 MessagePumpForUI* pump_ui() {
611 return static_cast<MessagePumpForUI*>(pump_.get()); 611 return static_cast<MessagePumpForUI*>(pump_.get());
612 } 612 }
613 #endif // !defined(OS_MACOSX) 613 #endif // !defined(OS_MACOSX)
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
717 717
718 // Do not add any member variables to MessageLoopForIO! This is important b/c 718 // Do not add any member variables to MessageLoopForIO! This is important b/c
719 // MessageLoopForIO is often allocated via MessageLoop(TYPE_IO). Any extra 719 // MessageLoopForIO is often allocated via MessageLoop(TYPE_IO). Any extra
720 // data that you need should be stored on the MessageLoop's pump_ instance. 720 // data that you need should be stored on the MessageLoop's pump_ instance.
721 COMPILE_ASSERT(sizeof(MessageLoop) == sizeof(MessageLoopForIO), 721 COMPILE_ASSERT(sizeof(MessageLoop) == sizeof(MessageLoopForIO),
722 MessageLoopForIO_should_not_have_extra_member_variables); 722 MessageLoopForIO_should_not_have_extra_member_variables);
723 723
724 } // namespace base 724 } // namespace base
725 725
726 #endif // BASE_MESSAGE_LOOP_MESSAGE_LOOP_H_ 726 #endif // BASE_MESSAGE_LOOP_MESSAGE_LOOP_H_
OLDNEW
« no previous file with comments | « base/base.gypi ('k') | base/message_loop/message_pump_aurax11.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698