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

Side by Side Diff: chrome/browser/ppapi_plugin_process_host.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/ppapi_plugin_process_host.h" 5 #include "chrome/browser/ppapi_plugin_process_host.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/file_path.h" 8 #include "base/file_path.h"
9 #include "base/process_util.h" 9 #include "base/process_util.h"
10 #include "chrome/browser/renderer_host/render_message_filter.h" 10 #include "chrome/browser/renderer_host/render_message_filter.h"
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 cmd_line); 62 cmd_line);
63 } 63 }
64 64
65 bool PpapiPluginProcessHost::CanShutdown() { 65 bool PpapiPluginProcessHost::CanShutdown() {
66 return true; 66 return true;
67 } 67 }
68 68
69 void PpapiPluginProcessHost::OnProcessLaunched() { 69 void PpapiPluginProcessHost::OnProcessLaunched() {
70 } 70 }
71 71
72 void PpapiPluginProcessHost::OnMessageReceived(const IPC::Message& msg) { 72 bool PpapiPluginProcessHost::OnMessageReceived(const IPC::Message& msg) {
73 bool handled = true;
73 IPC_BEGIN_MESSAGE_MAP(PpapiPluginProcessHost, msg) 74 IPC_BEGIN_MESSAGE_MAP(PpapiPluginProcessHost, msg)
74 IPC_MESSAGE_HANDLER(PpapiHostMsg_PluginLoaded, OnPluginLoaded) 75 IPC_MESSAGE_HANDLER(PpapiHostMsg_PluginLoaded, OnPluginLoaded)
75 IPC_MESSAGE_UNHANDLED_ERROR(); 76 IPC_MESSAGE_UNHANDLED(handled = false)
76 IPC_END_MESSAGE_MAP() 77 IPC_END_MESSAGE_MAP()
78 DCHECK(handled);
79 return handled;
77 } 80 }
78 81
79 void PpapiPluginProcessHost::OnChannelConnected(int32 peer_pid) { 82 void PpapiPluginProcessHost::OnChannelConnected(int32 peer_pid) {
80 #if defined(OS_WIN) 83 #if defined(OS_WIN)
81 base::ProcessHandle plugins_renderer_handle = NULL; 84 base::ProcessHandle plugins_renderer_handle = NULL;
82 ::DuplicateHandle(::GetCurrentProcess(), filter_->peer_handle(), 85 ::DuplicateHandle(::GetCurrentProcess(), filter_->peer_handle(),
83 GetChildProcessHandle(), &plugins_renderer_handle, 86 GetChildProcessHandle(), &plugins_renderer_handle,
84 0, FALSE, DUPLICATE_SAME_ACCESS); 87 0, FALSE, DUPLICATE_SAME_ACCESS);
85 #elif defined(OS_POSIX) 88 #elif defined(OS_POSIX)
86 base::ProcessHandle plugins_renderer_handle = filter_->peer_handle(); 89 base::ProcessHandle plugins_renderer_handle = filter_->peer_handle();
(...skipping 28 matching lines...) Expand all
115 118
116 void PpapiPluginProcessHost::ReplyToRenderer( 119 void PpapiPluginProcessHost::ReplyToRenderer(
117 base::ProcessHandle plugin_handle, 120 base::ProcessHandle plugin_handle,
118 const IPC::ChannelHandle& channel_handle) { 121 const IPC::ChannelHandle& channel_handle) {
119 DCHECK(reply_msg_.get()); 122 DCHECK(reply_msg_.get());
120 ViewHostMsg_OpenChannelToPepperPlugin::WriteReplyParams(reply_msg_.get(), 123 ViewHostMsg_OpenChannelToPepperPlugin::WriteReplyParams(reply_msg_.get(),
121 plugin_handle, 124 plugin_handle,
122 channel_handle); 125 channel_handle);
123 filter_->Send(reply_msg_.release()); 126 filter_->Send(reply_msg_.release());
124 } 127 }
OLDNEW
« no previous file with comments | « chrome/browser/ppapi_plugin_process_host.h ('k') | chrome/browser/profile_import_process_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698