| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_CORE_H_ | 5 #ifndef MOJO_EDK_SYSTEM_CORE_H_ |
| 6 #define MOJO_EDK_SYSTEM_CORE_H_ | 6 #define MOJO_EDK_SYSTEM_CORE_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| 11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
| 12 #include "mojo/edk/system/handle_table.h" | 12 #include "mojo/edk/system/handle_table.h" |
| 13 #include "mojo/edk/system/mapping_table.h" | 13 #include "mojo/edk/system/mapping_table.h" |
| 14 #include "mojo/edk/system/memory.h" | 14 #include "mojo/edk/system/memory.h" |
| 15 #include "mojo/edk/system/mutex.h" | 15 #include "mojo/edk/system/mutex.h" |
| 16 #include "mojo/edk/system/system_impl_export.h" | |
| 17 #include "mojo/public/c/system/buffer.h" | 16 #include "mojo/public/c/system/buffer.h" |
| 18 #include "mojo/public/c/system/data_pipe.h" | 17 #include "mojo/public/c/system/data_pipe.h" |
| 19 #include "mojo/public/c/system/message_pipe.h" | 18 #include "mojo/public/c/system/message_pipe.h" |
| 20 #include "mojo/public/c/system/types.h" | 19 #include "mojo/public/c/system/types.h" |
| 21 #include "mojo/public/cpp/system/macros.h" | 20 #include "mojo/public/cpp/system/macros.h" |
| 22 | 21 |
| 23 namespace mojo { | 22 namespace mojo { |
| 24 | 23 |
| 25 namespace embedder { | 24 namespace embedder { |
| 26 class PlatformSupport; | 25 class PlatformSupport; |
| 27 } | 26 } |
| 28 | 27 |
| 29 namespace system { | 28 namespace system { |
| 30 | 29 |
| 31 class Dispatcher; | 30 class Dispatcher; |
| 32 struct HandleSignalsState; | 31 struct HandleSignalsState; |
| 33 | 32 |
| 34 // |Core| is an object that implements the Mojo system calls. All public methods | 33 // |Core| is an object that implements the Mojo system calls. All public methods |
| 35 // are thread-safe. | 34 // are thread-safe. |
| 36 class MOJO_SYSTEM_IMPL_EXPORT Core { | 35 class Core { |
| 37 public: | 36 public: |
| 38 // --------------------------------------------------------------------------- | 37 // --------------------------------------------------------------------------- |
| 39 | 38 |
| 40 // These methods are only to be used by via the embedder API (and internally): | 39 // These methods are only to be used by via the embedder API (and internally): |
| 41 | 40 |
| 42 // |*platform_support| must outlive this object. | 41 // |*platform_support| must outlive this object. |
| 43 explicit Core(embedder::PlatformSupport* platform_support); | 42 explicit Core(embedder::PlatformSupport* platform_support); |
| 44 virtual ~Core(); | 43 virtual ~Core(); |
| 45 | 44 |
| 46 // Adds |dispatcher| to the handle table, returning the handle for it. Returns | 45 // Adds |dispatcher| to the handle table, returning the handle for it. Returns |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 Mutex mapping_table_mutex_; | 181 Mutex mapping_table_mutex_; |
| 183 MappingTable mapping_table_ MOJO_GUARDED_BY(mapping_table_mutex_); | 182 MappingTable mapping_table_ MOJO_GUARDED_BY(mapping_table_mutex_); |
| 184 | 183 |
| 185 MOJO_DISALLOW_COPY_AND_ASSIGN(Core); | 184 MOJO_DISALLOW_COPY_AND_ASSIGN(Core); |
| 186 }; | 185 }; |
| 187 | 186 |
| 188 } // namespace system | 187 } // namespace system |
| 189 } // namespace mojo | 188 } // namespace mojo |
| 190 | 189 |
| 191 #endif // MOJO_EDK_SYSTEM_CORE_H_ | 190 #endif // MOJO_EDK_SYSTEM_CORE_H_ |
| OLD | NEW |