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

Side by Side Diff: mojo/embedder/embedder.h

Issue 382333002: Introduce ChannelMojo (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixing Mac build failure Created 6 years, 5 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 unified diff | Download patch | Annotate | Revision Log
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 #ifndef MOJO_EMBEDDER_EMBEDDER_H_ 5 #ifndef MOJO_EMBEDDER_EMBEDDER_H_
6 #define MOJO_EMBEDDER_EMBEDDER_H_ 6 #define MOJO_EMBEDDER_EMBEDDER_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/task_runner.h" 10 #include "base/task_runner.h"
11 #include "mojo/embedder/scoped_platform_handle.h" 11 #include "mojo/embedder/scoped_platform_handle.h"
12 #include "mojo/public/cpp/system/core.h" 12 #include "mojo/public/cpp/system/core.h"
13 #include "mojo/system/system_impl_export.h" 13 #include "mojo/system/system_impl_export.h"
14 14
15 namespace mojo { 15 namespace mojo {
16 namespace embedder { 16 namespace embedder {
17 17
18 // Must be called first to initialize the (global, singleton) system. 18 // Must be called first to initialize the (global, singleton) system.
19 MOJO_SYSTEM_IMPL_EXPORT void Init(); 19 MOJO_SYSTEM_IMPL_EXPORT void Init();
20 MOJO_SYSTEM_IMPL_EXPORT void InitIfNeeded();
viettrungluu 2014/07/15 16:28:07 I'd really rather avoid adding this. It's a sympto
20 21
21 // Creates a new "channel", returning a handle to the bootstrap message pipe on 22 // Creates a new "channel", returning a handle to the bootstrap message pipe on
22 // that channel. |platform_handle| should be an OS-dependent handle to one side 23 // that channel. |platform_handle| should be an OS-dependent handle to one side
23 // of a suitable bidirectional OS "pipe" (e.g., a file descriptor to a socket on 24 // of a suitable bidirectional OS "pipe" (e.g., a file descriptor to a socket on
24 // POSIX, a handle to a named pipe on Windows); this "pipe" should be connected 25 // POSIX, a handle to a named pipe on Windows); this "pipe" should be connected
25 // and ready for operation (e.g., to be written to or read from). 26 // and ready for operation (e.g., to be written to or read from).
26 // |io_thread_task_runner| should be a |TaskRunner| for the thread on which the 27 // |io_thread_task_runner| should be a |TaskRunner| for the thread on which the
27 // "channel" will run (read data and demultiplex). 28 // "channel" will run (read data and demultiplex).
28 // 29 //
29 // On completion, it will run |callback| with a pointer to a |ChannelInfo| 30 // On completion, it will run |callback| with a pointer to a |ChannelInfo|
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 // |CreatePlatformHandleWrapper()| above). Note that the |MojoHandle| must still 69 // |CreatePlatformHandleWrapper()| above). Note that the |MojoHandle| must still
69 // be closed separately. 70 // be closed separately.
70 MOJO_SYSTEM_IMPL_EXPORT MojoResult PassWrappedPlatformHandle( 71 MOJO_SYSTEM_IMPL_EXPORT MojoResult PassWrappedPlatformHandle(
71 MojoHandle platform_handle_wrapper_handle, 72 MojoHandle platform_handle_wrapper_handle,
72 ScopedPlatformHandle* platform_handle); 73 ScopedPlatformHandle* platform_handle);
73 74
74 } // namespace embedder 75 } // namespace embedder
75 } // namespace mojo 76 } // namespace mojo
76 77
77 #endif // MOJO_EMBEDDER_EMBEDDER_H_ 78 #endif // MOJO_EMBEDDER_EMBEDDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698