OLD | NEW |
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 #ifndef VM_MESSAGE_HANDLER_H_ | 5 #ifndef VM_MESSAGE_HANDLER_H_ |
6 #define VM_MESSAGE_HANDLER_H_ | 6 #define VM_MESSAGE_HANDLER_H_ |
7 | 7 |
8 #include "vm/message.h" | 8 #include "vm/message.h" |
9 #include "vm/thread.h" | 9 #include "vm/thread.h" |
10 #include "vm/thread_pool.h" | 10 #include "vm/thread_pool.h" |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 #endif | 108 #endif |
109 | 109 |
110 protected: | 110 protected: |
111 // ------------ START PortMap API ------------ | 111 // ------------ START PortMap API ------------ |
112 // These functions should only be called from the PortMap. | 112 // These functions should only be called from the PortMap. |
113 | 113 |
114 // Does this message handler correspond to the current isolate? | 114 // Does this message handler correspond to the current isolate? |
115 virtual bool IsCurrentIsolate() const { return false; } | 115 virtual bool IsCurrentIsolate() const { return false; } |
116 | 116 |
117 // Return Isolate to which this message handler corresponds to. | 117 // Return Isolate to which this message handler corresponds to. |
118 virtual Isolate* GetIsolate() const { return NULL; } | 118 virtual Isolate* isolate() const { return NULL; } |
119 | 119 |
120 // Posts a message on this handler's message queue. | 120 // Posts a message on this handler's message queue. |
121 void PostMessage(Message* message); | 121 void PostMessage(Message* message); |
122 | 122 |
123 // Notifies this handler that a port is being closed. | 123 // Notifies this handler that a port is being closed. |
124 void ClosePort(Dart_Port port); | 124 void ClosePort(Dart_Port port); |
125 | 125 |
126 // Notifies this handler that all ports are being closed. | 126 // Notifies this handler that all ports are being closed. |
127 void CloseAllPorts(); | 127 void CloseAllPorts(); |
128 | 128 |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 StartCallback start_callback_; | 172 StartCallback start_callback_; |
173 EndCallback end_callback_; | 173 EndCallback end_callback_; |
174 CallbackData callback_data_; | 174 CallbackData callback_data_; |
175 | 175 |
176 DISALLOW_COPY_AND_ASSIGN(MessageHandler); | 176 DISALLOW_COPY_AND_ASSIGN(MessageHandler); |
177 }; | 177 }; |
178 | 178 |
179 } // namespace dart | 179 } // namespace dart |
180 | 180 |
181 #endif // VM_MESSAGE_HANDLER_H_ | 181 #endif // VM_MESSAGE_HANDLER_H_ |
OLD | NEW |