Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(481)

Unified Diff: runtime/bin/eventhandler_win.h

Issue 19263003: Add FileSystemWatcher class to dart:io. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Cleanup Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: runtime/bin/eventhandler_win.h
diff --git a/runtime/bin/eventhandler_win.h b/runtime/bin/eventhandler_win.h
index 1c62200853866744b377565cd0488b8a72e5ab5a..1e7554c64c968c18b3b96308b13af3a335d2b416 100644
--- a/runtime/bin/eventhandler_win.h
+++ b/runtime/bin/eventhandler_win.h
@@ -130,7 +130,12 @@ class OverlappedBuffer {
// sockets.
class Handle {
public:
- enum Type { kFile, kClientSocket, kListenSocket };
+ enum Type {
+ kFile,
+ kDirectoryWatch,
+ kClientSocket,
+ kListenSocket
+ };
class ScopedLock {
public:
@@ -256,6 +261,27 @@ class FileHandle : public Handle {
};
+class DirectoryWatchHandle : public Handle {
+ public:
+ DirectoryWatchHandle(HANDLE handle, int events, bool recursive)
+ : Handle(reinterpret_cast<HANDLE>(handle)),
+ events_(events),
+ recursive_(recursive) {
+ type_ = kDirectoryWatch;
+ }
+
+ virtual void EnsureInitialized(EventHandlerImplementation* event_handler);
+ virtual bool IsClosed();
+ virtual void DoClose();
+
+ virtual bool IssueRead();
+
+ private:
+ int events_;
+ bool recursive_;
+};
+
+
class SocketHandle : public Handle {
public:
SOCKET socket() { return reinterpret_cast<SOCKET>(handle_); }

Powered by Google App Engine
This is Rietveld 408576698