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

Side by Side Diff: chrome/nacl/nacl_ipc_adapter.cc

Issue 11366038: Rewrite PPB_AudioInput_Dev to use the new-style host/resource. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 1 month 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
« no previous file with comments | « no previous file | content/content_renderer.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "chrome/nacl/nacl_ipc_adapter.h" 5 #include "chrome/nacl/nacl_ipc_adapter.h"
6 6
7 #include <limits.h> 7 #include <limits.h>
8 #include <string.h> 8 #include <string.h>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after
455 // message sending code sees this and doesn't pass the descriptor over 455 // message sending code sees this and doesn't pass the descriptor over
456 // correctly. 456 // correctly.
457 if (msg.type() == PpapiMsg_CreateNaClChannel::ID) 457 if (msg.type() == PpapiMsg_CreateNaClChannel::ID)
458 new_msg_ptr = &new_msg; 458 new_msg_ptr = &new_msg;
459 #endif 459 #endif
460 460
461 Handles handles; 461 Handles handles;
462 switch (msg.type()) { 462 switch (msg.type()) {
463 CASE_FOR_MESSAGE(PpapiMsg_CreateNaClChannel) 463 CASE_FOR_MESSAGE(PpapiMsg_CreateNaClChannel)
464 CASE_FOR_MESSAGE(PpapiMsg_PPBAudio_NotifyAudioStreamCreated) 464 CASE_FOR_MESSAGE(PpapiMsg_PPBAudio_NotifyAudioStreamCreated)
465 CASE_FOR_MESSAGE(PpapiMsg_PPBAudioInput_OpenACK)
466 case IPC_REPLY_ID: { 465 case IPC_REPLY_ID: {
467 int id = IPC::SyncMessage::GetMessageId(msg); 466 int id = IPC::SyncMessage::GetMessageId(msg);
468 LockedData::PendingSyncMsgMap::iterator iter( 467 LockedData::PendingSyncMsgMap::iterator iter(
469 locked_data_.pending_sync_msgs_.find(id)); 468 locked_data_.pending_sync_msgs_.find(id));
470 if (iter == locked_data_.pending_sync_msgs_.end()) { 469 if (iter == locked_data_.pending_sync_msgs_.end()) {
471 NOTREACHED(); 470 NOTREACHED();
472 return false; 471 return false;
473 } 472 }
474 uint32_t type = iter->second; 473 uint32_t type = iter->second;
475 locked_data_.pending_sync_msgs_.erase(iter); 474 locked_data_.pending_sync_msgs_.erase(iter);
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
670 header.payload_size = static_cast<uint32>(msg.payload_size()); 669 header.payload_size = static_cast<uint32>(msg.payload_size());
671 header.routing = msg.routing_id(); 670 header.routing = msg.routing_id();
672 header.type = msg.type(); 671 header.type = msg.type();
673 header.flags = msg.flags(); 672 header.flags = msg.flags();
674 header.num_fds = static_cast<int>(rewritten_msg->desc_count()); 673 header.num_fds = static_cast<int>(rewritten_msg->desc_count());
675 674
676 rewritten_msg->SetData(header, msg.payload(), msg.payload_size()); 675 rewritten_msg->SetData(header, msg.payload(), msg.payload_size());
677 locked_data_.to_be_received_.push(rewritten_msg); 676 locked_data_.to_be_received_.push(rewritten_msg);
678 } 677 }
679 678
OLDNEW
« no previous file with comments | « no previous file | content/content_renderer.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698