Index: mojo/public/cpp/system/handle.h |
diff --git a/mojo/public/cpp/system/handle.h b/mojo/public/cpp/system/handle.h |
index 5b2eb7bb1d8b61a34a651ba7a8521e620bd08762..def4870568b59401e74b0a5044bec3aeff0c0ba4 100644 |
--- a/mojo/public/cpp/system/handle.h |
+++ b/mojo/public/cpp/system/handle.h |
@@ -13,6 +13,7 @@ |
#include "base/macros.h" |
#include "mojo/public/c/system/functions.h" |
#include "mojo/public/c/system/types.h" |
+#include "mojo/public/cpp/system/handle_signals_state.h" |
namespace mojo { |
@@ -170,6 +171,14 @@ class Handle { |
DCHECK_EQ(MOJO_RESULT_OK, result); |
} |
+ HandleSignalsState QuerySignalsState() const { |
+ HandleSignalsState signals_state; |
+ MojoResult result = MojoQueryHandleSignalsState( |
+ value_, static_cast<MojoHandleSignalsState*>(&signals_state)); |
+ DCHECK_EQ(MOJO_RESULT_OK, result); |
+ return static_cast<HandleSignalsState>(signals_state); |
yzshen1
2017/03/14 18:20:45
nit: no need to static_cast
Ken Rockot(use gerrit already)
2017/03/14 19:16:19
Oops, done
|
+ } |
+ |
private: |
MojoHandle value_; |