| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_TABLE_H_ | 5 #ifndef MOJO_EDK_SYSTEM_HANDLE_TABLE_H_ |
| 6 #define MOJO_EDK_SYSTEM_HANDLE_TABLE_H_ | 6 #define MOJO_EDK_SYSTEM_HANDLE_TABLE_H_ |
| 7 | 7 |
| 8 #include <utility> | 8 #include <utility> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/containers/hash_tables.h" | 11 #include "base/containers/hash_tables.h" |
| 12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
| 13 #include "mojo/edk/system/system_impl_export.h" | 13 #include "mojo/edk/system/system_impl_export.h" |
| 14 #include "mojo/public/c/system/types.h" | 14 #include "mojo/public/c/system/types.h" |
| 15 #include "mojo/public/cpp/system/macros.h" | 15 #include "mojo/public/cpp/system/macros.h" |
| 16 | 16 |
| 17 namespace mojo { | 17 namespace mojo { |
| 18 namespace system { | 18 namespace edk { |
| 19 | 19 |
| 20 class Core; | 20 class Core; |
| 21 class Dispatcher; | 21 class Dispatcher; |
| 22 class DispatcherTransport; | 22 class DispatcherTransport; |
| 23 | 23 |
| 24 using DispatcherVector = std::vector<scoped_refptr<Dispatcher>>; | 24 using DispatcherVector = std::vector<scoped_refptr<Dispatcher>>; |
| 25 | 25 |
| 26 // Test-only function (defined/used in embedder/test_embedder.cc). Declared here | 26 // Test-only function (defined/used in embedder/test_embedder.cc). Declared here |
| 27 // so it can be friended. | 27 // so it can be friended. |
| 28 namespace internal { | 28 namespace internal { |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 // Adds the given dispatcher to the handle table, not doing any size checks. | 131 // Adds the given dispatcher to the handle table, not doing any size checks. |
| 132 MojoHandle AddDispatcherNoSizeCheck( | 132 MojoHandle AddDispatcherNoSizeCheck( |
| 133 const scoped_refptr<Dispatcher>& dispatcher); | 133 const scoped_refptr<Dispatcher>& dispatcher); |
| 134 | 134 |
| 135 HandleToEntryMap handle_to_entry_map_; | 135 HandleToEntryMap handle_to_entry_map_; |
| 136 MojoHandle next_handle_; // Invariant: never |MOJO_HANDLE_INVALID|. | 136 MojoHandle next_handle_; // Invariant: never |MOJO_HANDLE_INVALID|. |
| 137 | 137 |
| 138 MOJO_DISALLOW_COPY_AND_ASSIGN(HandleTable); | 138 MOJO_DISALLOW_COPY_AND_ASSIGN(HandleTable); |
| 139 }; | 139 }; |
| 140 | 140 |
| 141 } // namespace system | 141 } // namespace edk |
| 142 } // namespace mojo | 142 } // namespace mojo |
| 143 | 143 |
| 144 #endif // MOJO_EDK_SYSTEM_HANDLE_TABLE_H_ | 144 #endif // MOJO_EDK_SYSTEM_HANDLE_TABLE_H_ |
| OLD | NEW |