Index: mojo/message_pump/handle_watcher.h |
diff --git a/mojo/message_pump/handle_watcher.h b/mojo/message_pump/handle_watcher.h |
index 4f7115a8613fa75f81ebb0cd191dacd03845d0c9..5da816db2a8f5ba52d200b0621410b3c49eb6738 100644 |
--- a/mojo/message_pump/handle_watcher.h |
+++ b/mojo/message_pump/handle_watcher.h |
@@ -7,6 +7,7 @@ |
#include "base/basictypes.h" |
#include "base/callback_forward.h" |
+#include "base/location.h" |
#include "base/memory/scoped_ptr.h" |
#include "base/run_loop.h" |
#include "mojo/message_pump/mojo_message_pump_export.h" |
@@ -26,11 +27,13 @@ class HandleWatcherTest; |
// when the handle is ready, or the deadline has expired. |
class MOJO_MESSAGE_PUMP_EXPORT HandleWatcher { |
public: |
- HandleWatcher(); |
+ explicit HandleWatcher(int location); |
// The destructor implicitly stops listening. See Stop() for details. |
~HandleWatcher(); |
+ int location() const { return location_; } |
+ |
// Starts listening for |handle|. This implicitly invokes Stop(). In other |
// words, Start() performs one asynchronous watch at a time. It is ok to call |
// Start() multiple times, but it cancels any existing watches. |callback| is |
@@ -52,6 +55,8 @@ class MOJO_MESSAGE_PUMP_EXPORT HandleWatcher { |
class SameThreadWatchingState; |
class SecondaryThreadWatchingState; |
+ const int location_; |
+ |
// If non-NULL Start() has been invoked. |
scoped_ptr<StateBase> state_; |