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

Side by Side Diff: content/renderer/mojo/mojo_render_process_observer.h

Issue 195993010: Adds the ability for the renderer to create the mojo channel (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: use_mojo 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
« no previous file with comments | « content/content_renderer.gypi ('k') | content/renderer/mojo/mojo_render_process_observer.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 CONTENT_RENDERER_MOJO_MOJO_RENDER_PROCESS_OBSERVER_H_
6 #define CONTENT_RENDERER_MOJO_MOJO_RENDER_PROCESS_OBSERVER_H_
7
8 #include "base/memory/scoped_ptr.h"
9 #include "content/public/renderer/render_process_observer.h"
10 #include "ipc/ipc_platform_file.h"
11
12 namespace mojo {
13 namespace embedder{
14 struct ChannelInfo;
15 }
16 }
17
18 namespace content {
19
20 class MojoChannelInit;
21 class RenderThread;
22
23 // RenderProcessObserver implementation that initializes the mojo channel when
24 // the right IPC is seen.
25 // MojoRenderProcessObserver deletes itself when the RenderProcess is shutdown.
26 class MojoRenderProcessObserver : public content::RenderProcessObserver {
27 public:
28 MojoRenderProcessObserver(RenderThread* render_thread);
29
30 // RenderProcessObserver overrides:
31 virtual bool OnControlMessageReceived(const IPC::Message& message) OVERRIDE;
32 virtual void OnRenderProcessShutdown() OVERRIDE;
33
34 private:
35 virtual ~MojoRenderProcessObserver();
36
37 void OnChannelCreated(const IPC::PlatformFileForTransit& file);
38
39 content::RenderThread* render_thread_;
40
41 scoped_ptr<MojoChannelInit> channel_init_;
42
43 DISALLOW_COPY_AND_ASSIGN(MojoRenderProcessObserver);
44 };
45
46 } // namespace content
47
48 #endif // CONTENT_RENDERER_MOJO_MOJO_RENDER_PROCESS_OBSERVER_H_
OLDNEW
« no previous file with comments | « content/content_renderer.gypi ('k') | content/renderer/mojo/mojo_render_process_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698