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

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: Fix android socket. Created 7 years, 3 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
« no previous file with comments | « runtime/bin/builtin_natives.cc ('k') | runtime/bin/eventhandler_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/eventhandler_win.h
diff --git a/runtime/bin/eventhandler_win.h b/runtime/bin/eventhandler_win.h
index 1c62200853866744b377565cd0488b8a72e5ab5a..3adaf5795a112852d1558c52d0e2d264e2602725 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:
@@ -246,13 +251,34 @@ class Handle {
class FileHandle : public Handle {
public:
explicit FileHandle(HANDLE handle)
- : Handle(reinterpret_cast<HANDLE>(handle)) { type_ = kFile; }
+ : Handle(handle) { type_ = kFile; }
FileHandle(HANDLE handle, Dart_Port port)
- : Handle(reinterpret_cast<HANDLE>(handle), port) { type_ = kFile; }
+ : Handle(handle, port) { type_ = kFile; }
+
+ virtual void EnsureInitialized(EventHandlerImplementation* event_handler);
+ virtual bool IsClosed();
+ virtual void DoClose();
+};
+
+
+class DirectoryWatchHandle : public Handle {
+ public:
+ DirectoryWatchHandle(HANDLE handle, int events, bool recursive)
+ : 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_;
};
« no previous file with comments | « runtime/bin/builtin_natives.cc ('k') | runtime/bin/eventhandler_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698