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

Unified Diff: chrome/browser/nacl_host/nacl_broker_host_win.cc

Issue 9150017: Add a Content API around BrowserChildProcessHost, similar to what was done with ChildProcessHost.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix?! Created 8 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/nacl_host/nacl_broker_host_win.cc
===================================================================
--- chrome/browser/nacl_host/nacl_broker_host_win.cc (revision 118420)
+++ chrome/browser/nacl_host/nacl_broker_host_win.cc (working copy)
@@ -14,11 +14,13 @@
#include "chrome/common/logging_chrome.h"
#include "chrome/common/nacl_cmd_line.h"
#include "chrome/common/nacl_messages.h"
+#include "content/public/browser/browser_child_process_host.h"
#include "content/public/common/child_process_host.h"
NaClBrokerHost::NaClBrokerHost()
- : BrowserChildProcessHost(content::PROCESS_TYPE_NACL_BROKER),
- stopping_(false) {
+ : stopping_(false) {
+ process_.reset(content::BrowserChildProcessHost::Create(
+ content::PROCESS_TYPE_NACL_BROKER, this));
}
NaClBrokerHost::~NaClBrokerHost() {
@@ -26,7 +28,7 @@
bool NaClBrokerHost::Init() {
// Create the channel that will be used for communicating with the broker.
- std::string channel_id = child_process_host()->CreateChannel();
+ std::string channel_id = process_->GetHost()->CreateChannel();
if (channel_id.empty())
return false;
@@ -45,7 +47,7 @@
if (logging::DialogsAreSuppressed())
cmd_line->AppendSwitch(switches::kNoErrorDialogs);
- BrowserChildProcessHost::Launch(FilePath(), cmd_line);
+ process_->Launch(FilePath(), cmd_line);
return true;
}
@@ -60,7 +62,8 @@
bool NaClBrokerHost::LaunchLoader(
const std::wstring& loader_channel_id) {
- return Send(new NaClProcessMsg_LaunchLoaderThroughBroker(loader_channel_id));
+ return process_->Send(
+ new NaClProcessMsg_LaunchLoaderThroughBroker(loader_channel_id));
}
void NaClBrokerHost::OnLoaderLaunched(const std::wstring& loader_channel_id,
@@ -70,5 +73,5 @@
void NaClBrokerHost::StopBroker() {
stopping_ = true;
- Send(new NaClProcessMsg_StopBroker());
+ process_->Send(new NaClProcessMsg_StopBroker());
}
« no previous file with comments | « chrome/browser/nacl_host/nacl_broker_host_win.h ('k') | chrome/browser/nacl_host/nacl_broker_service_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698