| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef MOJO_EDK_SYSTEM_HANDLE_H_ | 5 #ifndef MOJO_EDK_SYSTEM_HANDLE_H_ |
| 6 #define MOJO_EDK_SYSTEM_HANDLE_H_ | 6 #define MOJO_EDK_SYSTEM_HANDLE_H_ |
| 7 | 7 |
| 8 #include <vector> |
| 9 |
| 8 #include "mojo/edk/util/ref_ptr.h" | 10 #include "mojo/edk/util/ref_ptr.h" |
| 9 #include "mojo/public/c/system/handle.h" | 11 #include "mojo/public/c/system/handle.h" |
| 10 | 12 |
| 11 namespace mojo { | 13 namespace mojo { |
| 12 namespace system { | 14 namespace system { |
| 13 | 15 |
| 14 class Dispatcher; | 16 class Dispatcher; |
| 15 | 17 |
| 16 // Struct that represents what a handle *value* refers to (via the handle | 18 // Struct that represents what a handle *value* refers to (via the handle |
| 17 // table) -- a dispatcher and a (bit)set of rights. | 19 // table) -- a dispatcher and a (bit)set of rights. |
| (...skipping 17 matching lines...) Expand all Loading... |
| 35 | 37 |
| 36 void reset() { *this = Handle(); } | 38 void reset() { *this = Handle(); } |
| 37 | 39 |
| 38 // Note: |dispatcher| is guaranteed to be null if default-constructed or | 40 // Note: |dispatcher| is guaranteed to be null if default-constructed or |
| 39 // moved-from, but we make no guarantees about the value of |rights| in either | 41 // moved-from, but we make no guarantees about the value of |rights| in either |
| 40 // case. | 42 // case. |
| 41 util::RefPtr<Dispatcher> dispatcher; | 43 util::RefPtr<Dispatcher> dispatcher; |
| 42 MojoHandleRights rights; | 44 MojoHandleRights rights; |
| 43 }; | 45 }; |
| 44 | 46 |
| 47 using HandleVector = std::vector<Handle>; |
| 48 |
| 45 } // namespace system | 49 } // namespace system |
| 46 } // namespace mojo | 50 } // namespace mojo |
| 47 | 51 |
| 48 #endif // MOJO_EDK_SYSTEM_HANDLE_H_ | 52 #endif // MOJO_EDK_SYSTEM_HANDLE_H_ |
| OLD | NEW |