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

Unified Diff: mojo/system/core.h

Issue 484893004: Mojo: Make Core own a PlatformSupport, and plumb it through to Channel. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review comments Created 6 years, 4 months 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/channel_unittest.cc ('k') | mojo/system/core.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/system/core.h
diff --git a/mojo/system/core.h b/mojo/system/core.h
index d590db2c99875f1a957560d51a0aa1fb64285eef..eb9d0f72cef8c32002e0334f16f0fae4f4dabc95 100644
--- a/mojo/system/core.h
+++ b/mojo/system/core.h
@@ -9,6 +9,7 @@
#include "base/macros.h"
#include "base/memory/ref_counted.h"
+#include "base/memory/scoped_ptr.h"
#include "base/synchronization/lock.h"
#include "mojo/public/c/system/buffer.h"
#include "mojo/public/c/system/data_pipe.h"
@@ -20,6 +21,11 @@
#include "mojo/system/system_impl_export.h"
namespace mojo {
+
+namespace embedder {
+class PlatformSupport;
+}
+
namespace system {
class Dispatcher;
@@ -29,7 +35,9 @@ struct HandleSignalsState;
// are thread-safe.
class MOJO_SYSTEM_IMPL_EXPORT Core {
public:
- // These methods are only to be used by via the embedder API (and internally).
+ // ---------------------------------------------------------------------------
+
+ // These methods are only to be used by via the embedder API (and internally):
Core();
virtual ~Core();
@@ -41,7 +49,13 @@ class MOJO_SYSTEM_IMPL_EXPORT Core {
// invalid.
scoped_refptr<Dispatcher> GetDispatcher(MojoHandle handle);
- // System calls implementation.
+ embedder::PlatformSupport* platform_support() const {
+ return platform_support_.get();
+ }
+
+ // ---------------------------------------------------------------------------
+
+ // System calls implementation:
MojoTimeTicks GetTimeTicksNow();
MojoResult Close(MojoHandle handle);
MojoResult Wait(MojoHandle handle,
@@ -123,7 +137,7 @@ class MOJO_SYSTEM_IMPL_EXPORT Core {
uint32_t* result_index,
HandleSignalsState* signals_states);
- // ---------------------------------------------------------------------------
+ const scoped_ptr<embedder::PlatformSupport> platform_support_;
// TODO(vtl): |handle_table_lock_| should be a reader-writer lock (if only we
// had them).
@@ -133,8 +147,6 @@ class MOJO_SYSTEM_IMPL_EXPORT Core {
base::Lock mapping_table_lock_; // Protects |mapping_table_|.
MappingTable mapping_table_;
- // ---------------------------------------------------------------------------
-
DISALLOW_COPY_AND_ASSIGN(Core);
};
« no previous file with comments | « mojo/system/channel_unittest.cc ('k') | mojo/system/core.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698