| 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_WIN_H_ | 5 #ifndef BIN_EVENTHANDLER_WIN_H_ |
| 6 #define BIN_EVENTHANDLER_WIN_H_ | 6 #define BIN_EVENTHANDLER_WIN_H_ |
| 7 | 7 |
| 8 #if !defined(BIN_EVENTHANDLER_H_) | 8 #if !defined(BIN_EVENTHANDLER_H_) |
| 9 #error Do not include eventhandler_win.h directly; use eventhandler.h instead. | 9 #error Do not include eventhandler_win.h directly; use eventhandler.h instead. |
| 10 #endif | 10 #endif |
| (...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 333 bool write_thread_running_; | 333 bool write_thread_running_; |
| 334 dart::Monitor* write_monitor_; | 334 dart::Monitor* write_monitor_; |
| 335 }; | 335 }; |
| 336 | 336 |
| 337 | 337 |
| 338 class DirectoryWatchHandle : public Handle { | 338 class DirectoryWatchHandle : public Handle { |
| 339 public: | 339 public: |
| 340 DirectoryWatchHandle(HANDLE handle, int events, bool recursive) | 340 DirectoryWatchHandle(HANDLE handle, int events, bool recursive) |
| 341 : Handle(handle), | 341 : Handle(handle), |
| 342 events_(events), | 342 events_(events), |
| 343 recursive_(recursive) { | 343 recursive_(recursive), |
| 344 closed_(false) { |
| 344 type_ = kDirectoryWatch; | 345 type_ = kDirectoryWatch; |
| 345 } | 346 } |
| 346 | 347 |
| 347 virtual void EnsureInitialized(EventHandlerImplementation* event_handler); | 348 virtual void EnsureInitialized(EventHandlerImplementation* event_handler); |
| 348 virtual bool IsClosed(); | 349 virtual bool IsClosed(); |
| 350 virtual void DoClose(); |
| 349 | 351 |
| 350 virtual bool IssueRead(); | 352 virtual bool IssueRead(); |
| 351 | 353 |
| 352 void Stop(); | 354 void Stop(); |
| 353 | 355 |
| 354 private: | 356 private: |
| 355 int events_; | 357 int events_; |
| 356 bool recursive_; | 358 bool recursive_; |
| 359 bool closed_; |
| 357 }; | 360 }; |
| 358 | 361 |
| 359 | 362 |
| 360 class SocketHandle : public Handle { | 363 class SocketHandle : public Handle { |
| 361 public: | 364 public: |
| 362 SOCKET socket() { return reinterpret_cast<SOCKET>(handle_); } | 365 SOCKET socket() { return reinterpret_cast<SOCKET>(handle_); } |
| 363 | 366 |
| 364 protected: | 367 protected: |
| 365 explicit SocketHandle(SOCKET s) : Handle(reinterpret_cast<HANDLE>(s)) {} | 368 explicit SocketHandle(SOCKET s) : Handle(reinterpret_cast<HANDLE>(s)) {} |
| 366 SocketHandle(SOCKET s, Dart_Port port) | 369 SocketHandle(SOCKET s, Dart_Port port) |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 531 | 534 |
| 532 TimeoutQueue timeout_queue_; // Time for next timeout. | 535 TimeoutQueue timeout_queue_; // Time for next timeout. |
| 533 bool shutdown_; | 536 bool shutdown_; |
| 534 HANDLE completion_port_; | 537 HANDLE completion_port_; |
| 535 }; | 538 }; |
| 536 | 539 |
| 537 } // namespace bin | 540 } // namespace bin |
| 538 } // namespace dart | 541 } // namespace dart |
| 539 | 542 |
| 540 #endif // BIN_EVENTHANDLER_WIN_H_ | 543 #endif // BIN_EVENTHANDLER_WIN_H_ |
| OLD | NEW |