Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 BIN_EVENTHANDLER_H_ | 5 #ifndef BIN_EVENTHANDLER_H_ |
| 6 #define BIN_EVENTHANDLER_H_ | 6 #define BIN_EVENTHANDLER_H_ |
| 7 | 7 |
| 8 #include "bin/builtin.h" | 8 #include "bin/builtin.h" |
| 9 #include "bin/isolate_data.h" | 9 #include "bin/isolate_data.h" |
| 10 | 10 |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 113 namespace dart { | 113 namespace dart { |
| 114 namespace bin { | 114 namespace bin { |
| 115 | 115 |
| 116 class EventHandler { | 116 class EventHandler { |
| 117 public: | 117 public: |
| 118 void SendData(intptr_t id, Dart_Port dart_port, int64_t data) { | 118 void SendData(intptr_t id, Dart_Port dart_port, int64_t data) { |
| 119 delegate_.SendData(id, dart_port, data); | 119 delegate_.SendData(id, dart_port, data); |
| 120 } | 120 } |
| 121 | 121 |
| 122 /** | 122 /** |
| 123 * Signal to main thread that event handler is done. | |
|
Søren Gjesse
2015/02/04 21:57:09
Maybe add "This is called by the event handler thr
| |
| 124 */ | |
| 125 void NotifyShutdownDone(); | |
| 126 | |
| 127 /** | |
| 123 * Start the event-handler. | 128 * Start the event-handler. |
| 124 */ | 129 */ |
| 125 static void Start(); | 130 static void Start(); |
| 126 | 131 |
| 127 /** | 132 /** |
| 128 * Stop the event-handler. It's expected that there will be no further calls | 133 * Stop the event-handler. It's expected that there will be no further calls |
|
Søren Gjesse
2015/02/04 21:57:09
Maybe add "This is called by the main thread to ..
| |
| 129 * to SendData after a call to Stop. | 134 * to SendData after a call to Stop. |
| 130 */ | 135 */ |
| 131 static void Stop(); | 136 static void Stop(); |
| 132 | 137 |
| 133 static EventHandlerImplementation* delegate(); | 138 static EventHandlerImplementation* delegate(); |
| 134 | 139 |
| 135 private: | 140 private: |
| 136 friend class EventHandlerImplementation; | 141 friend class EventHandlerImplementation; |
| 137 EventHandlerImplementation delegate_; | 142 EventHandlerImplementation delegate_; |
| 138 }; | 143 }; |
| 139 | 144 |
| 140 } // namespace bin | 145 } // namespace bin |
| 141 } // namespace dart | 146 } // namespace dart |
| 142 | 147 |
| 143 #endif // BIN_EVENTHANDLER_H_ | 148 #endif // BIN_EVENTHANDLER_H_ |
| OLD | NEW |