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

Unified Diff: dart/runtime/bin/eventhandler_android.h

Issue 900363004: Introduce a kSetEventMaskCommand, some cleanups in windows eventhandler (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments Created 5 years, 10 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 | « dart/runtime/bin/eventhandler.h ('k') | dart/runtime/bin/eventhandler_android.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/runtime/bin/eventhandler_android.h
diff --git a/dart/runtime/bin/eventhandler_android.h b/dart/runtime/bin/eventhandler_android.h
index 93728b1c5584a4485cf88a01c61b275b38d1252e..2f9ab911f9355763b3ecfd6f68c94d875b8936b3 100644
--- a/dart/runtime/bin/eventhandler_android.h
+++ b/dart/runtime/bin/eventhandler_android.h
@@ -24,8 +24,9 @@ namespace bin {
class SocketData {
public:
- explicit SocketData(intptr_t fd)
- : fd_(fd), port_(0), mask_(0), tokens_(16) {
+ explicit SocketData(intptr_t fd, bool listening_socket)
+ : fd_(fd), port_(0), mask_(0), tokens_(16),
+ listening_socket_(listening_socket) {
ASSERT(fd_ != -1);
}
@@ -47,7 +48,7 @@ class SocketData {
intptr_t fd() { return fd_; }
Dart_Port port() { return port_; }
- bool IsListeningSocket() { return (mask_ & (1 << kListeningSocket)) != 0; }
+ bool IsListeningSocket() { return listening_socket_; }
// Returns true if the last token was taken.
bool TakeToken() {
@@ -68,6 +69,7 @@ class SocketData {
Dart_Port port_;
intptr_t mask_;
int tokens_;
+ bool listening_socket_;
};
@@ -78,7 +80,7 @@ class EventHandlerImplementation {
// Gets the socket data structure for a given file
// descriptor. Creates a new one if one is not found.
- SocketData* GetSocketData(intptr_t fd);
+ SocketData* GetSocketData(intptr_t fd, bool is_listening);
void SendData(intptr_t id, Dart_Port dart_port, intptr_t data);
void Start(EventHandler* handler);
void Shutdown();
« no previous file with comments | « dart/runtime/bin/eventhandler.h ('k') | dart/runtime/bin/eventhandler_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698