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

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 "build/build_config.h" 9 #include "build/build_config.h"
10 10
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 FilePath GetManifestPath(); 77 FilePath GetManifestPath();
78 bool LaunchSelLdr(); 78 bool LaunchSelLdr();
79 79
80 // BrowserChildProcessHostDelegate implementation: 80 // BrowserChildProcessHostDelegate implementation:
81 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; 81 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE;
82 virtual void OnProcessCrashed(int exit_code) OVERRIDE; 82 virtual void OnProcessCrashed(int exit_code) OVERRIDE;
83 virtual void OnProcessLaunched() OVERRIDE; 83 virtual void OnProcessLaunched() OVERRIDE;
84 84
85 void IrtReady(); 85 void IrtReady();
86 86
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 87 // Called once all initialization is complete and the NaCl process is
96 // ready to go. Returns true on success. 88 // ready to go. Returns true on success.
97 bool SendStart(); 89 bool SendStart();
98 90
99 // Does post-process-launching tasks for starting the NaCl process once 91 // Does post-process-launching tasks for starting the NaCl process once
100 // we have a connection. 92 // we have a connection.
101 // 93 //
102 // Returns false on failure. 94 // Returns false on failure.
103 bool StartWithLaunchedProcess(); 95 bool StartWithLaunchedProcess();
104 96
105 // Message handlers for validation caching. 97 // Message handlers for validation caching.
106 void OnQueryKnownToValidate(const std::string& signature, bool* result); 98 void OnQueryKnownToValidate(const std::string& signature, bool* result);
107 void OnSetKnownToValidate(const std::string& signature); 99 void OnSetKnownToValidate(const std::string& signature);
108 #if defined(OS_WIN) 100 #if defined(OS_WIN)
109 // Message handler for Windows hardware exception handling. 101 // Message handler for Windows hardware exception handling.
110 void OnAttachDebugExceptionHandler(const std::string& info, 102 void OnAttachDebugExceptionHandler(const std::string& info,
111 IPC::Message* reply_msg); 103 IPC::Message* reply_msg);
112 bool AttachDebugExceptionHandler(const std::string& info, 104 bool AttachDebugExceptionHandler(const std::string& info,
113 IPC::Message* reply_msg); 105 IPC::Message* reply_msg);
114 #endif 106 #endif
115 107
108 void OnPpapiChannelCreated(const IPC::ChannelHandle& channel_handle);
109
116 GURL manifest_url_; 110 GURL manifest_url_;
117 111
118 #if defined(OS_WIN) 112 #if defined(OS_WIN)
119 // This field becomes true when the broker successfully launched 113 // This field becomes true when the broker successfully launched
120 // the NaCl loader. 114 // the NaCl loader.
121 bool process_launched_by_broker_; 115 bool process_launched_by_broker_;
122 #elif defined(OS_LINUX) 116 #elif defined(OS_LINUX)
123 bool wait_for_nacl_gdb_; 117 bool wait_for_nacl_gdb_;
124 MessageLoopForIO::FileDescriptorWatcher nacl_gdb_watcher_; 118 MessageLoopForIO::FileDescriptorWatcher nacl_gdb_watcher_;
125 scoped_ptr<MessageLoopForIO::Watcher> nacl_gdb_watcher_delegate_; 119 scoped_ptr<MessageLoopForIO::Watcher> nacl_gdb_watcher_delegate_;
(...skipping 21 matching lines...) Expand all
147 base::WeakPtrFactory<NaClProcessHost> weak_factory_; 141 base::WeakPtrFactory<NaClProcessHost> weak_factory_;
148 142
149 scoped_ptr<content::BrowserChildProcessHost> process_; 143 scoped_ptr<content::BrowserChildProcessHost> process_;
150 144
151 bool enable_exception_handling_; 145 bool enable_exception_handling_;
152 146
153 DISALLOW_COPY_AND_ASSIGN(NaClProcessHost); 147 DISALLOW_COPY_AND_ASSIGN(NaClProcessHost);
154 }; 148 };
155 149
156 #endif // CHROME_BROWSER_NACL_HOST_NACL_PROCESS_HOST_H_ 150 #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/browser/nacl_host/nacl_process_host.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698