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

Side by Side Diff: chrome/browser/nacl_host/nacl_broker_host_win.cc

Issue 5978003: Make IPC::Channel::Listener:OnMessageReceived have a return value indicating ... (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 #include "chrome/browser/nacl_host/nacl_broker_host_win.h" 5 #include "chrome/browser/nacl_host/nacl_broker_host_win.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/path_service.h" 8 #include "base/path_service.h"
9 #include "ipc/ipc_switches.h" 9 #include "ipc/ipc_switches.h"
10 #include "chrome/browser/nacl_host/nacl_broker_service_win.h" 10 #include "chrome/browser/nacl_host/nacl_broker_service_win.h"
(...skipping 28 matching lines...) Expand all
39 39
40 cmd_line->AppendSwitchASCII(switches::kProcessType, 40 cmd_line->AppendSwitchASCII(switches::kProcessType,
41 switches::kNaClBrokerProcess); 41 switches::kNaClBrokerProcess);
42 42
43 cmd_line->AppendSwitchASCII(switches::kProcessChannelID, channel_id()); 43 cmd_line->AppendSwitchASCII(switches::kProcessChannelID, channel_id());
44 44
45 BrowserChildProcessHost::Launch(FilePath(), cmd_line); 45 BrowserChildProcessHost::Launch(FilePath(), cmd_line);
46 return true; 46 return true;
47 } 47 }
48 48
49 void NaClBrokerHost::OnMessageReceived(const IPC::Message& msg) { 49 bool NaClBrokerHost::OnMessageReceived(const IPC::Message& msg) {
50 bool handled = true;
50 IPC_BEGIN_MESSAGE_MAP(NaClBrokerHost, msg) 51 IPC_BEGIN_MESSAGE_MAP(NaClBrokerHost, msg)
51 IPC_MESSAGE_HANDLER(NaClProcessMsg_LoaderLaunched, OnLoaderLaunched) 52 IPC_MESSAGE_HANDLER(NaClProcessMsg_LoaderLaunched, OnLoaderLaunched)
53 IPC_MESSAGE_UNHANDLED(handled = false)
52 IPC_END_MESSAGE_MAP() 54 IPC_END_MESSAGE_MAP()
55 return handled;
53 } 56 }
54 57
55 bool NaClBrokerHost::LaunchLoader( 58 bool NaClBrokerHost::LaunchLoader(
56 const std::wstring& loader_channel_id) { 59 const std::wstring& loader_channel_id) {
57 return Send(new NaClProcessMsg_LaunchLoaderThroughBroker(loader_channel_id)); 60 return Send(new NaClProcessMsg_LaunchLoaderThroughBroker(loader_channel_id));
58 } 61 }
59 62
60 void NaClBrokerHost::OnLoaderLaunched(const std::wstring& loader_channel_id, 63 void NaClBrokerHost::OnLoaderLaunched(const std::wstring& loader_channel_id,
61 base::ProcessHandle handle) { 64 base::ProcessHandle handle) {
62 NaClBrokerService::GetInstance()->OnLoaderLaunched(loader_channel_id, handle); 65 NaClBrokerService::GetInstance()->OnLoaderLaunched(loader_channel_id, handle);
63 } 66 }
64 67
65 void NaClBrokerHost::StopBroker() { 68 void NaClBrokerHost::StopBroker() {
66 stopping_ = true; 69 stopping_ = true;
67 Send(new NaClProcessMsg_StopBroker()); 70 Send(new NaClProcessMsg_StopBroker());
68 } 71 }
OLDNEW
« no previous file with comments | « chrome/browser/nacl_host/nacl_broker_host_win.h ('k') | chrome/browser/nacl_host/nacl_process_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698