| 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_SYSTEM_CORE_IMPL_H_ | 5 #ifndef MOJO_SYSTEM_CORE_IMPL_H_ |
| 6 #define MOJO_SYSTEM_CORE_IMPL_H_ | 6 #define MOJO_SYSTEM_CORE_IMPL_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/containers/hash_tables.h" | 9 #include "base/containers/hash_tables.h" |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| 11 #include "base/synchronization/lock.h" | 11 #include "base/synchronization/lock.h" |
| 12 #include "mojo/public/system/core.h" | 12 #include "mojo/public/system/core.h" |
| 13 | 13 |
| 14 namespace mojo { | 14 namespace mojo { |
| 15 namespace system { | 15 namespace system { |
| 16 | 16 |
| 17 class CoreImpl; | 17 class CoreImpl; |
| 18 class Dispatcher; | 18 class Dispatcher; |
| 19 | 19 |
| 20 namespace test { | 20 namespace test { |
| 21 class CoreTestBase; | 21 class CoreTestBase; |
| 22 } | 22 } |
| 23 | 23 |
| 24 // |CoreImpl| is a singleton object that implements the Mojo system calls. With | 24 // |CoreImpl| is a singleton object that implements the Mojo system calls. With |
| 25 // the (obvious) exception of |Init()|, which must be called first (and the call | 25 // the (obvious) exception of |Init()|, which must be called first (and the call |
| 26 // completed) before making any other calls, all the public methods are | 26 // completed) before making any other calls, all the public methods are |
| 27 // thread-safe. | 27 // thread-safe. |
| 28 class CoreImpl { | 28 class MOJO_SYSTEM_EXPORT CoreImpl { |
| 29 public: | 29 public: |
| 30 static void Init(); | 30 static void Init(); |
| 31 | 31 |
| 32 static CoreImpl* Get() { | 32 static CoreImpl* Get() { |
| 33 return singleton_; | 33 return singleton_; |
| 34 } | 34 } |
| 35 | 35 |
| 36 MojoResult Close(MojoHandle handle); | 36 MojoResult Close(MojoHandle handle); |
| 37 | 37 |
| 38 MojoResult Wait(MojoHandle handle, | 38 MojoResult Wait(MojoHandle handle, |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 | 95 |
| 96 // --------------------------------------------------------------------------- | 96 // --------------------------------------------------------------------------- |
| 97 | 97 |
| 98 DISALLOW_COPY_AND_ASSIGN(CoreImpl); | 98 DISALLOW_COPY_AND_ASSIGN(CoreImpl); |
| 99 }; | 99 }; |
| 100 | 100 |
| 101 } // namespace system | 101 } // namespace system |
| 102 } // namespace mojo | 102 } // namespace mojo |
| 103 | 103 |
| 104 #endif // MOJO_SYSTEM_CORE_IMPL_H_ | 104 #endif // MOJO_SYSTEM_CORE_IMPL_H_ |
| OLD | NEW |