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

Side by Side Diff: content/browser/ppapi_plugin_process_host.cc

Issue 10912062: Implement the gamepad API in the IPC proxy (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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 #include "content/browser/ppapi_plugin_process_host.h" 5 #include "content/browser/ppapi_plugin_process_host.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/base_switches.h" 9 #include "base/base_switches.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 renderer_id, client->OffTheRecord()); 236 renderer_id, client->OffTheRecord());
237 msg->set_unblock(true); 237 msg->set_unblock(true);
238 if (Send(msg)) { 238 if (Send(msg)) {
239 sent_requests_.push(client); 239 sent_requests_.push(client);
240 } else { 240 } else {
241 client->OnPpapiChannelOpened(IPC::ChannelHandle(), 0); 241 client->OnPpapiChannelOpened(IPC::ChannelHandle(), 0);
242 } 242 }
243 } 243 }
244 244
245 void PpapiPluginProcessHost::OnProcessLaunched() { 245 void PpapiPluginProcessHost::OnProcessLaunched() {
246 host_impl_->set_plugin_process_handle(process_->GetHandle());
246 } 247 }
247 248
248 bool PpapiPluginProcessHost::OnMessageReceived(const IPC::Message& msg) { 249 bool PpapiPluginProcessHost::OnMessageReceived(const IPC::Message& msg) {
249 bool handled = true; 250 bool handled = true;
250 IPC_BEGIN_MESSAGE_MAP(PpapiPluginProcessHost, msg) 251 IPC_BEGIN_MESSAGE_MAP(PpapiPluginProcessHost, msg)
251 IPC_MESSAGE_HANDLER(PpapiHostMsg_ChannelCreated, 252 IPC_MESSAGE_HANDLER(PpapiHostMsg_ChannelCreated,
252 OnRendererPluginChannelCreated) 253 OnRendererPluginChannelCreated)
253 IPC_MESSAGE_UNHANDLED(handled = false) 254 IPC_MESSAGE_UNHANDLED(handled = false)
254 IPC_END_MESSAGE_MAP() 255 IPC_END_MESSAGE_MAP()
255 DCHECK(handled); 256 DCHECK(handled);
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 if (sent_requests_.empty()) 302 if (sent_requests_.empty())
302 return; 303 return;
303 304
304 // All requests should be processed FIFO, so the next item in the 305 // All requests should be processed FIFO, so the next item in the
305 // sent_requests_ queue should be the one that the plugin just created. 306 // sent_requests_ queue should be the one that the plugin just created.
306 Client* client = sent_requests_.front(); 307 Client* client = sent_requests_.front();
307 sent_requests_.pop(); 308 sent_requests_.pop();
308 309
309 client->OnPpapiChannelOpened(channel_handle, process_->GetData().id); 310 client->OnPpapiChannelOpened(channel_handle, process_->GetData().id);
310 } 311 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698