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

Side by Side Diff: chrome/browser/nacl_process_host.h

Issue 153002: NaCl-Chrome integration - step 1 (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 11 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 | Annotate | Revision Log
« no previous file with comments | « chrome/app/chrome_dll_main.cc ('k') | chrome/browser/nacl_process_host.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 // Copyright (c) 2009 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 CHROME_BROWSER_NACL_PROCESS_HOST_H_
6 #define CHROME_BROWSER_NACL_PROCESS_HOST_H_
7
8 #include "build/build_config.h"
9 #include "chrome/common/child_process_host.h"
10 #include "chrome/common/nacl_types.h"
11 #include "native_client/src/shared/imc/nacl_imc.h"
12
13 class ResourceMessageFilter;
14
15 // Represents the browser side of the browser <--> NaCl communication
16 // channel. There will be one NaClProcessHost per NaCl process
17 // The browser is responsible for starting the NaCl process
18 // when requested by the renderer.
19 // After that, most of the communication is directly between NaCl plugin
20 // running in the renderer and NaCl processes.
21 class NaClProcessHost : public ChildProcessHost {
22 public:
23 explicit NaClProcessHost(ResourceDispatcherHost *resource_dispatcher_host);
24 ~NaClProcessHost() {}
25
26 // Initialize the new NaCl process, returning true on success.
27 bool Launch(ResourceMessageFilter* renderer_msg_filter,
28 const int descriptor,
29 nacl::FileDescriptor *handle);
30
31 virtual void OnMessageReceived(const IPC::Message& msg);
32
33 private:
34 bool LaunchSelLdr(ResourceMessageFilter* renderer_msg_filter,
35 const int descriptor,
36 const nacl::Handle handle);
37
38 bool SendStartMessage(base::ProcessHandle process,
39 int descriptor,
40 nacl::Handle handle);
41
42 // ResourceDispatcherHost::Receiver implementation:
43 virtual URLRequestContext* GetRequestContext(
44 uint32 request_id,
45 const ViewHostMsg_Resource_Request& request_data);
46
47 virtual bool CanShutdown() { return true; }
48
49 private:
50 ResourceDispatcherHost* resource_dispatcher_host_;
51
52 DISALLOW_COPY_AND_ASSIGN(NaClProcessHost);
53 };
54
55 #endif // CHROME_BROWSER_NACL_PROCESS_HOST_H_
OLDNEW
« no previous file with comments | « chrome/app/chrome_dll_main.cc ('k') | chrome/browser/nacl_process_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698