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

Unified Diff: mojo/edk/embedder/embedder_internal.h

Issue 728613002: Make the embedder API use the ChannelManager. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: update comment Created 6 years, 1 month 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/edk/embedder/embedder.cc ('k') | mojo/edk/embedder/embedder_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/embedder/embedder_internal.h
diff --git a/mojo/edk/embedder/embedder_internal.h b/mojo/edk/embedder/embedder_internal.h
index b8919b0008522eaeb7bdb2e186d5f5ae75a838b0..ab8388ae80596a22d063f78b71df68b086e9b499 100644
--- a/mojo/edk/embedder/embedder_internal.h
+++ b/mojo/edk/embedder/embedder_internal.h
@@ -2,22 +2,50 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+// This header contains internal details for the *implementation* of the
+// embedder API. It should not be included by any public header (nor by users of
+// the embedder API).
+
#ifndef MOJO_EDK_EMBEDDER_EMBEDDER_INTERNAL_H_
#define MOJO_EDK_EMBEDDER_EMBEDDER_INTERNAL_H_
+#include <stdint.h>
+
namespace mojo {
namespace system {
+
+class ChannelManager;
class Core;
+
+// Repeat a typedef in mojo/edk/system/channel_manager.h, to avoid including it.
+typedef uintptr_t ChannelId;
+
} // namespace system
namespace embedder {
+
+// This is a type that's opaque to users of the embedder API (which only
+// gives/takes |ChannelInfo*|s). We make it a struct to make it
+// template-friendly.
+struct ChannelInfo {
+ explicit ChannelInfo(system::ChannelId channel_id = 0)
+ : channel_id(channel_id) {}
+
+ system::ChannelId channel_id;
+};
+
namespace internal {
// Instance of |Core| used by the system functions (|Mojo...()|).
extern system::Core* g_core;
+// Instance of |ChannelManager| used by the channel management functions
+// (|mojo::embedder::CreateChannel()|, etc.).
+extern system::ChannelManager* g_channel_manager;
+
} // namespace internal
+
} // namepace embedder
} // namespace mojo
« no previous file with comments | « mojo/edk/embedder/embedder.cc ('k') | mojo/edk/embedder/embedder_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698