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

Side by Side Diff: content/common/mojo/channel_init.h

Issue 1883323002: Reland of Use a token to initialise ChannelMojo and MojoApplication everywhere. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
« no previous file with comments | « content/common/in_process_child_thread_params.cc ('k') | content/common/mojo/channel_init.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_COMMON_MOJO_CHANNEL_INIT_H_
6 #define CONTENT_COMMON_MOJO_CHANNEL_INIT_H_
7
8 #include "base/files/file.h"
9 #include "base/macros.h"
10 #include "base/memory/ref_counted.h"
11 #include "content/common/content_export.h"
12 #include "mojo/public/cpp/system/message_pipe.h"
13
14 namespace base {
15 class TaskRunner;
16 }
17
18 namespace content {
19
20 // ChannelInit handles creation and destruction of the Mojo channel. It is not
21 // thread-safe, but may be used on any single thread with a MessageLoop.
22 //
23 // TODO(rockot): Get rid of this class ASAP (i.e. once the patch which includes
24 // this TODO has stuck for a bit) since it's no longer necessary.
25 class CONTENT_EXPORT ChannelInit {
26 public:
27 ChannelInit();
28 ~ChannelInit();
29
30 // Initializes the channel. This takes ownership of |file|.
31 mojo::ScopedMessagePipeHandle Init(
32 base::PlatformFile file,
33 scoped_refptr<base::TaskRunner> io_thread_task_runner);
34
35 private:
36 DISALLOW_COPY_AND_ASSIGN(ChannelInit);
37 };
38
39 } // namespace content
40
41 #endif // CONTENT_COMMON_MOJO_CHANNEL_INIT_H_
OLDNEW
« no previous file with comments | « content/common/in_process_child_thread_params.cc ('k') | content/common/mojo/channel_init.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698