OLD | NEW |
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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 // // Process |hr| (the result returned by DoDragDrop()). | 91 // // Process |hr| (the result returned by DoDragDrop()). |
92 // | 92 // |
93 // Please be SURE your task is reentrant (nestable) and all global variables | 93 // Please be SURE your task is reentrant (nestable) and all global variables |
94 // are stable and accessible before calling SetNestableTasksAllowed(true). | 94 // are stable and accessible before calling SetNestableTasksAllowed(true). |
95 // | 95 // |
96 class BASE_EXPORT MessageLoop : public MessagePump::Delegate { | 96 class BASE_EXPORT MessageLoop : public MessagePump::Delegate { |
97 public: | 97 public: |
98 | 98 |
99 #if defined(USE_GTK_MESSAGE_PUMP) | 99 #if defined(USE_GTK_MESSAGE_PUMP) |
100 typedef MessagePumpGdkObserver Observer; | 100 typedef MessagePumpGdkObserver Observer; |
101 #elif !defined(OS_MACOSX) && !defined(OS_ANDROID) | 101 #elif defined(USE_AURA) |
102 typedef MessagePumpDispatcher Dispatcher; | 102 typedef MessagePumpDispatcher Dispatcher; |
103 typedef MessagePumpObserver Observer; | 103 typedef MessagePumpObserver Observer; |
104 #endif | 104 #endif |
105 | 105 |
106 // A MessageLoop has a particular type, which indicates the set of | 106 // A MessageLoop has a particular type, which indicates the set of |
107 // asynchronous events it may process in addition to tasks and timers. | 107 // asynchronous events it may process in addition to tasks and timers. |
108 // | 108 // |
109 // TYPE_DEFAULT | 109 // TYPE_DEFAULT |
110 // This type of ML only supports tasks and timers. | 110 // This type of ML only supports tasks and timers. |
111 // | 111 // |
(...skipping 635 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
747 | 747 |
748 // Do not add any member variables to MessageLoopForIO! This is important b/c | 748 // Do not add any member variables to MessageLoopForIO! This is important b/c |
749 // MessageLoopForIO is often allocated via MessageLoop(TYPE_IO). Any extra | 749 // MessageLoopForIO is often allocated via MessageLoop(TYPE_IO). Any extra |
750 // data that you need should be stored on the MessageLoop's pump_ instance. | 750 // data that you need should be stored on the MessageLoop's pump_ instance. |
751 COMPILE_ASSERT(sizeof(MessageLoop) == sizeof(MessageLoopForIO), | 751 COMPILE_ASSERT(sizeof(MessageLoop) == sizeof(MessageLoopForIO), |
752 MessageLoopForIO_should_not_have_extra_member_variables); | 752 MessageLoopForIO_should_not_have_extra_member_variables); |
753 | 753 |
754 } // namespace base | 754 } // namespace base |
755 | 755 |
756 #endif // BASE_MESSAGE_LOOP_MESSAGE_LOOP_H_ | 756 #endif // BASE_MESSAGE_LOOP_MESSAGE_LOOP_H_ |
OLD | NEW |