Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | |
| 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. | |
| 4 | |
| 5 #ifndef BIN_EVENTHANDLER_FUCHSIA_H_ | |
| 6 #define BIN_EVENTHANDLER_FUCHSIA_H_ | |
| 7 | |
| 8 #if !defined(BIN_EVENTHANDLER_H_) | |
| 9 #error Do not include eventhandler_fuchsia.h directly; use eventhandler.h instea d. | |
| 10 #endif | |
| 11 | |
| 12 #include <magenta/syscalls.h> | |
| 13 | |
| 14 namespace dart { | |
| 15 namespace bin { | |
| 16 | |
| 17 class EventHandlerImplementation { | |
| 18 public: | |
| 19 EventHandlerImplementation(); | |
| 20 ~EventHandlerImplementation(); | |
| 21 | |
| 22 void SendData(intptr_t id, Dart_Port dart_port, int64_t data); | |
| 23 void Start(EventHandler* handler); | |
| 24 void Shutdown(); | |
| 25 | |
| 26 private: | |
| 27 int64_t GetTimeout(); | |
|
siva
2016/07/22 19:18:22
GetTimeout() const;
zra
2016/07/22 20:07:08
Done.
| |
| 28 void HandleEvents(); | |
| 29 void HandleTimeout(); | |
| 30 void WakeupHandler(intptr_t id, Dart_Port dart_port, int64_t data); | |
| 31 void HandleInterruptFd(); | |
| 32 static void Poll(uword args); | |
| 33 | |
| 34 TimeoutQueue timeout_queue_; | |
| 35 bool shutdown_; | |
| 36 mx_handle_t interrupt_handles_[2]; | |
| 37 | |
| 38 DISALLOW_COPY_AND_ASSIGN(EventHandlerImplementation); | |
| 39 }; | |
| 40 | |
| 41 } // namespace bin | |
| 42 } // namespace dart | |
| 43 | |
| 44 #endif // BIN_EVENTHANDLER_FUCHSIA_H_ | |
| OLD | NEW |