Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1992)

Unified Diff: mojo/system/core_impl.h

Issue 106173003: Split mojo_system dylib into public and private (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix win Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/system/core.cc ('k') | mojo/system/core_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/system/core_impl.h
diff --git a/mojo/system/core_impl.h b/mojo/system/core_impl.h
index fff8422be59a87f18293a58074a6832ef4d1e2e2..6548f20bd10d73d8e7b919da683a47ff261bf3da 100644
--- a/mojo/system/core_impl.h
+++ b/mojo/system/core_impl.h
@@ -6,10 +6,12 @@
#define MOJO_SYSTEM_CORE_IMPL_H_
#include "base/basictypes.h"
+#include "base/compiler_specific.h"
#include "base/containers/hash_tables.h"
#include "base/memory/ref_counted.h"
#include "base/synchronization/lock.h"
-#include "mojo/public/system/core.h"
+#include "mojo/public/system/core_private.h"
+#include "mojo/system/system_impl_export.h"
namespace mojo {
namespace system {
@@ -25,38 +27,39 @@ class CoreTestBase;
// the (obvious) exception of |Init()|, which must be called first (and the call
// completed) before making any other calls, all the public methods are
// thread-safe.
-class MOJO_SYSTEM_EXPORT CoreImpl {
+class MOJO_SYSTEM_IMPL_EXPORT CoreImpl : public Core {
public:
static void Init();
- static CoreImpl* Get() {
- return singleton_;
- }
+ virtual MojoResult Close(MojoHandle handle) OVERRIDE;
- MojoResult Close(MojoHandle handle);
+ virtual MojoResult Wait(MojoHandle handle,
+ MojoWaitFlags flags,
+ MojoDeadline deadline) OVERRIDE;
- MojoResult Wait(MojoHandle handle,
- MojoWaitFlags flags,
- MojoDeadline deadline);
-
- MojoResult WaitMany(const MojoHandle* handles,
- const MojoWaitFlags* flags,
- uint32_t num_handles,
- MojoDeadline deadline);
+ virtual MojoResult WaitMany(const MojoHandle* handles,
+ const MojoWaitFlags* flags,
+ uint32_t num_handles,
+ MojoDeadline deadline) OVERRIDE;
- MojoResult CreateMessagePipe(MojoHandle* handle_0, MojoHandle* handle_1);
+ virtual MojoResult CreateMessagePipe(MojoHandle* handle_0,
+ MojoHandle* handle_1) OVERRIDE;
- MojoResult WriteMessage(MojoHandle handle,
- const void* bytes, uint32_t num_bytes,
- const MojoHandle* handles, uint32_t num_handles,
- MojoWriteMessageFlags flags);
+ virtual MojoResult WriteMessage(MojoHandle handle,
+ const void* bytes,
+ uint32_t num_bytes,
+ const MojoHandle* handles,
+ uint32_t num_handles,
+ MojoWriteMessageFlags flags) OVERRIDE;
- MojoResult ReadMessage(MojoHandle handle,
- void* bytes, uint32_t* num_bytes,
- MojoHandle* handles, uint32_t* num_handles,
- MojoReadMessageFlags flags);
+ virtual MojoResult ReadMessage(MojoHandle handle,
+ void* bytes,
+ uint32_t* num_bytes,
+ MojoHandle* handles,
+ uint32_t* num_handles,
+ MojoReadMessageFlags flags) OVERRIDE;
- MojoTimeTicks GetTimeTicksNow();
+ virtual MojoTimeTicks GetTimeTicksNow() OVERRIDE;
private:
friend class test::CoreTestBase;
@@ -97,7 +100,7 @@ class MOJO_SYSTEM_EXPORT CoreImpl {
typedef base::hash_map<MojoHandle, HandleTableEntry> HandleTableMap;
CoreImpl();
- ~CoreImpl();
+ virtual ~CoreImpl();
// Looks up the dispatcher for the given handle. Returns null if the handle is
// invalid.
@@ -117,10 +120,6 @@ class MOJO_SYSTEM_EXPORT CoreImpl {
// ---------------------------------------------------------------------------
- static CoreImpl* singleton_;
-
- // ---------------------------------------------------------------------------
-
// TODO(vtl): |handle_table_lock_| should be a reader-writer lock (if only we
// had them).
base::Lock handle_table_lock_; // Protects the immediately-following members.
« no previous file with comments | « mojo/system/core.cc ('k') | mojo/system/core_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698