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

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

Issue 10214007: Add an IPC channel between the NaCl loader process and the renderer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 7 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
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <string>
10
9 #include "build/build_config.h" 11 #include "build/build_config.h"
10 12
11 #include "base/file_path.h" 13 #include "base/file_path.h"
12 #include "base/file_util_proxy.h" 14 #include "base/file_util_proxy.h"
13 #include "base/memory/ref_counted.h" 15 #include "base/memory/ref_counted.h"
14 #include "base/memory/weak_ptr.h" 16 #include "base/memory/weak_ptr.h"
15 #include "base/message_loop.h" 17 #include "base/message_loop.h"
16 #include "base/process.h" 18 #include "base/process.h"
17 #include "chrome/common/nacl_types.h" 19 #include "chrome/common/nacl_types.h"
18 #include "content/public/browser/browser_child_process_host_delegate.h" 20 #include "content/public/browser/browser_child_process_host_delegate.h"
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 FilePath GetManifestPath(); 79 FilePath GetManifestPath();
78 bool LaunchSelLdr(); 80 bool LaunchSelLdr();
79 81
80 // BrowserChildProcessHostDelegate implementation: 82 // BrowserChildProcessHostDelegate implementation:
81 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; 83 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE;
82 virtual void OnProcessCrashed(int exit_code) OVERRIDE; 84 virtual void OnProcessCrashed(int exit_code) OVERRIDE;
83 virtual void OnProcessLaunched() OVERRIDE; 85 virtual void OnProcessLaunched() OVERRIDE;
84 86
85 void IrtReady(); 87 void IrtReady();
86 88
87 // Sends the reply message to the renderer who is waiting for the plugin
88 // to load. Returns true on success.
89 bool ReplyToRenderer();
90
91 // Sends the message to the NaCl process to load the plugin. Returns true
92 // on success.
93 bool StartNaClExecution();
94
95 // Called once all initialization is complete and the NaCl process is 89 // Called once all initialization is complete and the NaCl process is
96 // ready to go. Returns true on success. 90 // ready to go. Returns true on success.
97 bool SendStart(); 91 bool SendStart();
98 92
99 // Does post-process-launching tasks for starting the NaCl process once 93 // Does post-process-launching tasks for starting the NaCl process once
100 // we have a connection. 94 // we have a connection.
101 // 95 //
102 // Returns false on failure. 96 // Returns false on failure.
103 bool StartWithLaunchedProcess(); 97 bool StartWithLaunchedProcess();
104 98
105 // Message handlers for validation caching. 99 // Message handlers for validation caching.
106 void OnQueryKnownToValidate(const std::string& signature, bool* result); 100 void OnQueryKnownToValidate(const std::string& signature, bool* result);
107 void OnSetKnownToValidate(const std::string& signature); 101 void OnSetKnownToValidate(const std::string& signature);
108 #if defined(OS_WIN) 102 #if defined(OS_WIN)
109 // Message handler for Windows hardware exception handling. 103 // Message handler for Windows hardware exception handling.
110 void OnAttachDebugExceptionHandler(const std::string& info, 104 void OnAttachDebugExceptionHandler(const std::string& info,
111 IPC::Message* reply_msg); 105 IPC::Message* reply_msg);
112 bool AttachDebugExceptionHandler(const std::string& info, 106 bool AttachDebugExceptionHandler(const std::string& info,
113 IPC::Message* reply_msg); 107 IPC::Message* reply_msg);
114 #endif 108 #endif
115 109
110 void OnPpapiChannelCreated(const IPC::ChannelHandle& channel_handle);
111
116 GURL manifest_url_; 112 GURL manifest_url_;
117 113
118 #if defined(OS_WIN) 114 #if defined(OS_WIN)
119 // This field becomes true when the broker successfully launched 115 // This field becomes true when the broker successfully launched
120 // the NaCl loader. 116 // the NaCl loader.
121 bool process_launched_by_broker_; 117 bool process_launched_by_broker_;
122 #elif defined(OS_LINUX) 118 #elif defined(OS_LINUX)
123 bool wait_for_nacl_gdb_; 119 bool wait_for_nacl_gdb_;
124 MessageLoopForIO::FileDescriptorWatcher nacl_gdb_watcher_; 120 MessageLoopForIO::FileDescriptorWatcher nacl_gdb_watcher_;
125 scoped_ptr<MessageLoopForIO::Watcher> nacl_gdb_watcher_delegate_; 121 scoped_ptr<MessageLoopForIO::Watcher> nacl_gdb_watcher_delegate_;
(...skipping 21 matching lines...) Expand all
147 base::WeakPtrFactory<NaClProcessHost> weak_factory_; 143 base::WeakPtrFactory<NaClProcessHost> weak_factory_;
148 144
149 scoped_ptr<content::BrowserChildProcessHost> process_; 145 scoped_ptr<content::BrowserChildProcessHost> process_;
150 146
151 bool enable_exception_handling_; 147 bool enable_exception_handling_;
152 148
153 DISALLOW_COPY_AND_ASSIGN(NaClProcessHost); 149 DISALLOW_COPY_AND_ASSIGN(NaClProcessHost);
154 }; 150 };
155 151
156 #endif // CHROME_BROWSER_NACL_HOST_NACL_PROCESS_HOST_H_ 152 #endif // CHROME_BROWSER_NACL_HOST_NACL_PROCESS_HOST_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/nacl_host/nacl_process_host.cc » ('j') | chrome/nacl/nacl_ipc_adapter.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698