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

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

Issue 5701004: Rename ResourceMessageFilter to RenderMessageFilter, since that's what it act... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years 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
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_NACL_HOST_NACL_PROCESS_HOST_H_ 5 #ifndef CHROME_BROWSER_NACL_HOST_NACL_PROCESS_HOST_H_
6 #define CHROME_BROWSER_NACL_HOST_NACL_PROCESS_HOST_H_ 6 #define CHROME_BROWSER_NACL_HOST_NACL_PROCESS_HOST_H_
7 #pragma once 7 #pragma once
8 8
9 #include "build/build_config.h" 9 #include "build/build_config.h"
10 10
11 #include "base/ref_counted.h" 11 #include "base/ref_counted.h"
12 #include "chrome/browser/browser_child_process_host.h" 12 #include "chrome/browser/browser_child_process_host.h"
13 #include "chrome/common/nacl_types.h" 13 #include "chrome/common/nacl_types.h"
14 #include "native_client/src/shared/imc/nacl_imc.h" 14 #include "native_client/src/shared/imc/nacl_imc.h"
15 15
16 class ResourceMessageFilter; 16 class RenderMessageFilter;
17 17
18 // Represents the browser side of the browser <--> NaCl communication 18 // Represents the browser side of the browser <--> NaCl communication
19 // channel. There will be one NaClProcessHost per NaCl process 19 // channel. There will be one NaClProcessHost per NaCl process
20 // The browser is responsible for starting the NaCl process 20 // The browser is responsible for starting the NaCl process
21 // when requested by the renderer. 21 // when requested by the renderer.
22 // After that, most of the communication is directly between NaCl plugin 22 // After that, most of the communication is directly between NaCl plugin
23 // running in the renderer and NaCl processes. 23 // running in the renderer and NaCl processes.
24 class NaClProcessHost : public BrowserChildProcessHost { 24 class NaClProcessHost : public BrowserChildProcessHost {
25 public: 25 public:
26 NaClProcessHost(ResourceDispatcherHost *resource_dispatcher_host, 26 NaClProcessHost(ResourceDispatcherHost *resource_dispatcher_host,
27 const std::wstring& url); 27 const std::wstring& url);
28 ~NaClProcessHost(); 28 ~NaClProcessHost();
29 29
30 // Initialize the new NaCl process, returning true on success. 30 // Initialize the new NaCl process, returning true on success.
31 bool Launch(ResourceMessageFilter* resource_message_filter, 31 bool Launch(RenderMessageFilter* render_message_filter,
32 int socket_count, 32 int socket_count,
33 IPC::Message* reply_msg); 33 IPC::Message* reply_msg);
34 34
35 virtual void OnMessageReceived(const IPC::Message& msg); 35 virtual void OnMessageReceived(const IPC::Message& msg);
36 36
37 void OnProcessLaunchedByBroker(base::ProcessHandle handle); 37 void OnProcessLaunchedByBroker(base::ProcessHandle handle);
38 38
39 protected: 39 protected:
40 virtual bool DidChildCrash(); 40 virtual bool DidChildCrash();
41 virtual void OnChildDied(); 41 virtual void OnChildDied();
(...skipping 13 matching lines...) Expand all
55 virtual bool CanShutdown() { return true; } 55 virtual bool CanShutdown() { return true; }
56 56
57 #if defined(OS_WIN) 57 #if defined(OS_WIN)
58 // Check whether the browser process is running on WOW64 - Windows only 58 // Check whether the browser process is running on WOW64 - Windows only
59 void CheckIsWow64(); 59 void CheckIsWow64();
60 #endif 60 #endif
61 61
62 private: 62 private:
63 ResourceDispatcherHost* resource_dispatcher_host_; 63 ResourceDispatcherHost* resource_dispatcher_host_;
64 64
65 // The ResourceMessageFilter that requested this NaCl process. We use this 65 // The RenderMessageFilter that requested this NaCl process. We use this
66 // for sending the reply once the process has started. 66 // for sending the reply once the process has started.
67 scoped_refptr<ResourceMessageFilter> resource_message_filter_; 67 scoped_refptr<RenderMessageFilter> render_message_filter_;
68 68
69 // The reply message to send. 69 // The reply message to send.
70 IPC::Message* reply_msg_; 70 IPC::Message* reply_msg_;
71 71
72 // Socket pairs for the NaCl process and renderer. 72 // Socket pairs for the NaCl process and renderer.
73 std::vector<nacl::Handle> sockets_for_renderer_; 73 std::vector<nacl::Handle> sockets_for_renderer_;
74 std::vector<nacl::Handle> sockets_for_sel_ldr_; 74 std::vector<nacl::Handle> sockets_for_sel_ldr_;
75 75
76 // Windows platform flag 76 // Windows platform flag
77 bool running_on_wow64_; 77 bool running_on_wow64_;
78 78
79 DISALLOW_COPY_AND_ASSIGN(NaClProcessHost); 79 DISALLOW_COPY_AND_ASSIGN(NaClProcessHost);
80 }; 80 };
81 81
82 #endif // CHROME_BROWSER_NACL_HOST_NACL_PROCESS_HOST_H_ 82 #endif // CHROME_BROWSER_NACL_HOST_NACL_PROCESS_HOST_H_
OLDNEW
« no previous file with comments | « chrome/browser/in_process_webkit/indexed_db_dispatcher_host.cc ('k') | chrome/browser/nacl_host/nacl_process_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698