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

Side by Side Diff: ipc/mojo/ipc_channel_mojo_host.h

Issue 553283002: IPC::ChannelMojo: Introduce IPC::MojoBootstrap for Windows (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed build error Created 6 years, 2 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 | « ipc/mojo/ipc_channel_mojo.cc ('k') | ipc/mojo/ipc_channel_mojo_host.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 2014 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 IPC_IPC_CHANNEL_MOJO_HOST_H_
6 #define IPC_IPC_CHANNEL_MOJO_HOST_H_
7
8 #include "base/memory/ref_counted.h"
9 #include "base/memory/weak_ptr.h"
10 #include "base/process/process_handle.h"
11 #include "ipc/ipc_export.h"
12
13 namespace base {
14 class TaskRunner;
15 }
16
17 namespace IPC {
18
19 class ChannelMojo;
20
21 // Through ChannelMojoHost, ChannelMojo gets extra information that
22 // its client provides, including the child process's process handle. Every
23 // server process that uses ChannelMojo must have a ChannelMojoHost
24 // instance and call OnClientLaunched().
25 class IPC_MOJO_EXPORT ChannelMojoHost {
26 public:
27 explicit ChannelMojoHost(scoped_refptr<base::TaskRunner> task_runner);
28 ~ChannelMojoHost();
29
30 void OnClientLaunched(base::ProcessHandle process);
31
32 private:
33 friend class ChannelMojo;
34
35 void OnChannelCreated(ChannelMojo* channel);
36 void OnChannelDestroyed();
37
38 void InvokeOnClientLaunched(base::ProcessHandle process);
39
40 base::WeakPtrFactory<ChannelMojoHost> weak_factory_;
41 scoped_refptr<base::TaskRunner> task_runner_;
42 ChannelMojo* channel_;
43
44 DISALLOW_COPY_AND_ASSIGN(ChannelMojoHost);
45 };
46
47 } // namespace IPC
48
49 #endif // IPC_IPC_CHANNEL_MOJO_HOST_H_
OLDNEW
« no previous file with comments | « ipc/mojo/ipc_channel_mojo.cc ('k') | ipc/mojo/ipc_channel_mojo_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698