| Index: mojo/edk/system/core.h
|
| diff --git a/third_party/mojo/src/mojo/edk/system/core.h b/mojo/edk/system/core.h
|
| similarity index 93%
|
| copy from third_party/mojo/src/mojo/edk/system/core.h
|
| copy to mojo/edk/system/core.h
|
| index 4ed5edeedc31a184501543fafca243a9bed22a00..bae038a447c67e53e58782b1c7508098d175e70f 100644
|
| --- a/third_party/mojo/src/mojo/edk/system/core.h
|
| +++ b/mojo/edk/system/core.h
|
| @@ -10,10 +10,10 @@
|
| #include "base/callback.h"
|
| #include "base/memory/ref_counted.h"
|
| #include "base/memory/scoped_ptr.h"
|
| +#include "base/synchronization/lock.h"
|
| #include "mojo/edk/system/handle_table.h"
|
| #include "mojo/edk/system/mapping_table.h"
|
| #include "mojo/edk/system/memory.h"
|
| -#include "mojo/edk/system/mutex.h"
|
| #include "mojo/edk/system/system_impl_export.h"
|
| #include "mojo/public/c/system/buffer.h"
|
| #include "mojo/public/c/system/data_pipe.h"
|
| @@ -23,13 +23,10 @@
|
|
|
| namespace mojo {
|
|
|
| -namespace embedder {
|
| -class PlatformSupport;
|
| -}
|
| -
|
| -namespace system {
|
| +namespace edk {
|
|
|
| class Dispatcher;
|
| +class PlatformSupport;
|
| struct HandleSignalsState;
|
|
|
| // |Core| is an object that implements the Mojo system calls. All public methods
|
| @@ -41,7 +38,7 @@ class MOJO_SYSTEM_IMPL_EXPORT Core {
|
| // These methods are only to be used by via the embedder API (and internally):
|
|
|
| // |*platform_support| must outlive this object.
|
| - explicit Core(embedder::PlatformSupport* platform_support);
|
| + explicit Core(PlatformSupport* platform_support);
|
| virtual ~Core();
|
|
|
| // Adds |dispatcher| to the handle table, returning the handle for it. Returns
|
| @@ -69,7 +66,7 @@ class MOJO_SYSTEM_IMPL_EXPORT Core {
|
| MojoHandleSignals signals,
|
| const base::Callback<void(MojoResult)>& callback);
|
|
|
| - embedder::PlatformSupport* platform_support() const {
|
| + PlatformSupport* platform_support() const {
|
| return platform_support_;
|
| }
|
|
|
| @@ -173,20 +170,20 @@ class MOJO_SYSTEM_IMPL_EXPORT Core {
|
| uint32_t* result_index,
|
| HandleSignalsState* signals_states);
|
|
|
| - embedder::PlatformSupport* const platform_support_;
|
| + PlatformSupport* const platform_support_;
|
|
|
| - // TODO(vtl): |handle_table_mutex_| should be a reader-writer lock (if only we
|
| + // TODO(vtl): |handle_table_lock_| should be a reader-writer lock (if only we
|
| // had them).
|
| - Mutex handle_table_mutex_;
|
| - HandleTable handle_table_ MOJO_GUARDED_BY(handle_table_mutex_);
|
| + base::Lock handle_table_lock_; // Protects |handle_table_|.
|
| + HandleTable handle_table_;
|
|
|
| - Mutex mapping_table_mutex_;
|
| - MappingTable mapping_table_ MOJO_GUARDED_BY(mapping_table_mutex_);
|
| + base::Lock mapping_table_lock_; // Protects |mapping_table_|.
|
| + MappingTable mapping_table_;
|
|
|
| MOJO_DISALLOW_COPY_AND_ASSIGN(Core);
|
| };
|
|
|
| -} // namespace system
|
| +} // namespace edk
|
| } // namespace mojo
|
|
|
| #endif // MOJO_EDK_SYSTEM_CORE_H_
|
|
|