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

Side by Side 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: 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 // This header contains internal details for the *implementation* of the
6 // embedder API. It should not be included by any public header (nor by users of
7 // the embedder API).
8
5 #ifndef MOJO_EDK_EMBEDDER_EMBEDDER_INTERNAL_H_ 9 #ifndef MOJO_EDK_EMBEDDER_EMBEDDER_INTERNAL_H_
6 #define MOJO_EDK_EMBEDDER_EMBEDDER_INTERNAL_H_ 10 #define MOJO_EDK_EMBEDDER_EMBEDDER_INTERNAL_H_
7 11
12 #include <stdint.h>
13
8 namespace mojo { 14 namespace mojo {
9 15
10 namespace system { 16 namespace system {
17
18 class ChannelManager;
11 class Core; 19 class Core;
20
21 // Repeat a typedef in mojo/edk/system/channel_manager.h, to avoid including it.
22 typedef uintptr_t ChannelId;
23
12 } // namespace system 24 } // namespace system
13 25
14 namespace embedder { 26 namespace embedder {
27
28 // This is a type that's opaque to users of the embedder API (which only
29 // gives/takes |ChannelInfo*|s). We make it a struct to make it
30 // template-friendly.
31 struct ChannelInfo {
32 explicit ChannelInfo(system::ChannelId channel_id = 0)
33 : channel_id(channel_id) {}
34
35 system::ChannelId channel_id;
36 };
37
15 namespace internal { 38 namespace internal {
16 39
17 // Instance of |Core| used by the system functions (|Mojo...()|). 40 // Instance of |Core| used by the system functions (|Mojo...()|).
18 extern system::Core* g_core; 41 extern system::Core* g_core;
19 42
43 // Instance of |ChannelManager| used by the channel management functions
44 // (|mojo::embedder::CreateChannel()|, etc.).
45 extern system::ChannelManager* g_channel_manager;
46
20 } // namespace internal 47 } // namespace internal
48
21 } // namepace embedder 49 } // namepace embedder
22 50
23 } // namespace mojo 51 } // namespace mojo
24 52
25 #endif // MOJO_EDK_EMBEDDER_EMBEDDER_INTERNAL_H_ 53 #endif // MOJO_EDK_EMBEDDER_EMBEDDER_INTERNAL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698