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_SYSTEM_HANDLE_TABLE_H_ | 5 #ifndef MOJO_SYSTEM_HANDLE_TABLE_H_ |
6 #define MOJO_SYSTEM_HANDLE_TABLE_H_ | 6 #define MOJO_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/macros.h" | 12 #include "base/macros.h" |
13 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
14 #include "mojo/public/c/system/types.h" | 14 #include "mojo/public/c/system/types.h" |
15 #include "mojo/system/system_impl_export.h" | 15 #include "mojo/system/system_impl_export.h" |
16 | 16 |
17 namespace mojo { | 17 namespace mojo { |
18 namespace system { | 18 namespace system { |
19 | 19 |
20 class Core; | 20 class Core; |
21 class Dispatcher; | 21 class Dispatcher; |
22 class DispatcherTransport; | 22 class DispatcherTransport; |
23 | 23 |
24 typedef std::vector<scoped_refptr<Dispatcher> > DispatcherVector; | 24 typedef std::vector<scoped_refptr<Dispatcher>> DispatcherVector; |
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 { |
29 bool ShutdownCheckNoLeaks(Core*); | 29 bool ShutdownCheckNoLeaks(Core*); |
30 } | 30 } |
31 | 31 |
32 // This class provides the (global) handle table (owned by |Core|), which maps | 32 // This class provides the (global) handle table (owned by |Core|), which maps |
33 // (valid) |MojoHandle|s to |Dispatcher|s. This is abstracted so that, e.g., | 33 // (valid) |MojoHandle|s to |Dispatcher|s. This is abstracted so that, e.g., |
34 // caching may be added. | 34 // caching may be added. |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 DISALLOW_COPY_AND_ASSIGN(HandleTable); | 138 DISALLOW_COPY_AND_ASSIGN(HandleTable); |
139 }; | 139 }; |
140 | 140 |
141 } // namespace system | 141 } // namespace system |
142 } // namespace mojo | 142 } // namespace mojo |
143 | 143 |
144 #endif // MOJO_SYSTEM_HANDLE_TABLE_H_ | 144 #endif // MOJO_SYSTEM_HANDLE_TABLE_H_ |
OLD | NEW |