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

Side by Side Diff: content/browser/renderer_host/render_process_host_mojo_impl.h

Issue 206923002: Adds plumbing to pass WebUI mojo::Handle from browser to renderer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge 2 trunk Created 6 years, 9 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
(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 CONTENT_BROWSER_RENDERER_HOST_BROWSER_RENDER_PROCESS_HOST_MOJO_IMPL_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_BROWSER_RENDER_PROCESS_HOST_MOJO_IMPL_H_
7
8 #include "base/memory/scoped_ptr.h"
9 #include "base/process/process_handle.h"
10 #include "content/common/mojo/render_process.mojom.h"
11 #include "mojo/public/bindings/remote_ptr.h"
12
13 namespace content {
14
15 class MojoChannelInit;
16 class RenderProcessHost;
17
18 // RenderProcessHostMojoImpl implements RenderProcessHostMojo. Additionally
darin (slow to review) 2014/03/21 00:04:52 nit: this first sentence can be deleted as it is p
sky 2014/03/21 03:19:16 Done.
19 // it is responsible for initiating the connection with the content side.
20 class RenderProcessHostMojoImpl : public RenderProcessHostMojo {
21 public:
22 explicit RenderProcessHostMojoImpl(RenderProcessHost* host);
23 virtual ~RenderProcessHostMojoImpl();
24
25 void SetWebUIHandle(int32 view_routing_id, mojo::ScopedHandle handle);
26
27 // Invoked when the RenderPorcessHost has established a channel.
28 void OnProcessLaunched();
29
30 private:
31 struct PendingHandle;
32
33 // Establishes the mojo channel to the renderer.
34 void CreateMojoChannel(base::ProcessHandle process_handle);
35
36 RenderProcessHost* host_;
37
38 // Used to establish the connection.
39 scoped_ptr<MojoChannelInit> mojo_channel_init_;
40
41 mojo::RemotePtr<content::RenderProcessMojo> render_process_mojo_;
42
43 // If non-null we're waiting to send a WebUI handle to the renderer when
44 // connected.
45 scoped_ptr<PendingHandle> pending_handle_;
46
47 DISALLOW_COPY_AND_ASSIGN(RenderProcessHostMojoImpl);
48 };
49
50 } // namespace content
51
52 #endif // CONTENT_BROWSER_RENDERER_HOST_BROWSER_RENDER_PROCESS_HOST_MOJO_IMPL_H _
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698