| 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 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 244 | 244 |
| 245 class FileHandle : public Handle { | 245 class FileHandle : public Handle { |
| 246 public: | 246 public: |
| 247 explicit FileHandle(HANDLE handle) | 247 explicit FileHandle(HANDLE handle) |
| 248 : Handle(reinterpret_cast<HANDLE>(handle)) { type_ = kFile; } | 248 : Handle(reinterpret_cast<HANDLE>(handle)) { type_ = kFile; } |
| 249 FileHandle(HANDLE handle, Dart_Port port) | 249 FileHandle(HANDLE handle, Dart_Port port) |
| 250 : Handle(reinterpret_cast<HANDLE>(handle), port) { type_ = kFile; } | 250 : Handle(reinterpret_cast<HANDLE>(handle), port) { type_ = kFile; } |
| 251 | 251 |
| 252 virtual void EnsureInitialized(EventHandlerImplementation* event_handler); | 252 virtual void EnsureInitialized(EventHandlerImplementation* event_handler); |
| 253 virtual bool IsClosed(); | 253 virtual bool IsClosed(); |
| 254 virtual void DoClose(); |
| 254 }; | 255 }; |
| 255 | 256 |
| 256 | 257 |
| 257 class SocketHandle : public Handle { | 258 class SocketHandle : public Handle { |
| 258 public: | 259 public: |
| 259 SOCKET socket() { return reinterpret_cast<SOCKET>(handle_); } | 260 SOCKET socket() { return reinterpret_cast<SOCKET>(handle_); } |
| 260 | 261 |
| 261 protected: | 262 protected: |
| 262 explicit SocketHandle(SOCKET s) : Handle(reinterpret_cast<HANDLE>(s)) {} | 263 explicit SocketHandle(SOCKET s) : Handle(reinterpret_cast<HANDLE>(s)) {} |
| 263 SocketHandle(SOCKET s, Dart_Port port) | 264 SocketHandle(SOCKET s, Dart_Port port) |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 392 int64_t timeout_; // Time for next timeout. | 393 int64_t timeout_; // Time for next timeout. |
| 393 Dart_Port timeout_port_; | 394 Dart_Port timeout_port_; |
| 394 bool shutdown_; | 395 bool shutdown_; |
| 395 HANDLE completion_port_; | 396 HANDLE completion_port_; |
| 396 }; | 397 }; |
| 397 | 398 |
| 398 } // namespace bin | 399 } // namespace bin |
| 399 } // namespace dart | 400 } // namespace dart |
| 400 | 401 |
| 401 #endif // BIN_EVENTHANDLER_WIN_H_ | 402 #endif // BIN_EVENTHANDLER_WIN_H_ |
| OLD | NEW |