Chromium Code Reviews| Index: runtime/bin/eventhandler_win.h |
| diff --git a/runtime/bin/eventhandler_win.h b/runtime/bin/eventhandler_win.h |
| index 121cee43f8e5bd0a972725cc45c770d1f8287971..a09b503fa9b74209dc6939e560c52043e0a1c67e 100644 |
| --- a/runtime/bin/eventhandler_win.h |
| +++ b/runtime/bin/eventhandler_win.h |
| @@ -228,7 +228,8 @@ class Handle { |
| void Lock(); |
| void Unlock(); |
| - bool CreateCompletionPort(HANDLE completion_port); |
| + bool DoCreateCompletionPort(HANDLE handle, HANDLE completion_port); |
| + virtual bool CreateCompletionPort(HANDLE completion_port); |
| void Close(); |
| virtual void DoClose(); |
| @@ -361,14 +362,22 @@ class DirectoryWatchHandle : public Handle { |
| class SocketHandle : public Handle { |
| public: |
| - SOCKET socket() { return reinterpret_cast<SOCKET>(handle_); } |
| + SOCKET socket() const { return socket_; } |
| + |
| + bool CreateCompletionPort(HANDLE completion_port); |
|
kasperl
2014/06/04 14:09:19
Maybe also mark this virtual? (like it's done with
Anders Johnsen
2014/06/04 14:16:32
Done.
|
| protected: |
| - explicit SocketHandle(SOCKET s) : Handle(reinterpret_cast<HANDLE>(s)) {} |
| + explicit SocketHandle(SOCKET s) |
| + : Handle(INVALID_HANDLE_VALUE), |
| + socket_(s) {} |
| SocketHandle(SOCKET s, Dart_Port port) |
| - : Handle(reinterpret_cast<HANDLE>(s), port) {} |
| + : Handle(INVALID_HANDLE_VALUE, port), |
| + socket_(s) {} |
| virtual void HandleIssueError(); |
| + |
| + private: |
| + const SOCKET socket_; |
| }; |