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

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

Issue 11437038: Revert 171408 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 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
« no previous file with comments | « chrome/browser/nacl_host/nacl_process_host.cc ('k') | chrome/test/ppapi/ppapi_browsertest.cc » ('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 528 matching lines...) Expand 10 before | Expand all | Expand 10 after
539 #endif 539 #endif
540 nacl_desc.reset(factory.MakeGeneric(ipc_adapter->MakeNaClDesc())); 540 nacl_desc.reset(factory.MakeGeneric(ipc_adapter->MakeNaClDesc()));
541 // Send back a message that the channel was created. 541 // Send back a message that the channel was created.
542 scoped_ptr<IPC::Message> response( 542 scoped_ptr<IPC::Message> response(
543 new PpapiHostMsg_ChannelCreated(channel_handle)); 543 new PpapiHostMsg_ChannelCreated(channel_handle));
544 task_runner_->PostTask(FROM_HERE, 544 task_runner_->PostTask(FROM_HERE,
545 base::Bind(&NaClIPCAdapter::SendMessageOnIOThread, this, 545 base::Bind(&NaClIPCAdapter::SendMessageOnIOThread, this,
546 base::Passed(&response))); 546 base::Passed(&response)));
547 break; 547 break;
548 } 548 }
549 case ppapi::proxy::SerializedHandle::FILE:
550 // TODO(raymes): Handle file handles for NaCl.
551 NOTIMPLEMENTED();
552 break;
553 case ppapi::proxy::SerializedHandle::INVALID: { 549 case ppapi::proxy::SerializedHandle::INVALID: {
554 // Nothing to do. TODO(dmichael): Should we log this? Or is it 550 // Nothing to do. TODO(dmichael): Should we log this? Or is it
555 // sometimes okay to pass an INVALID handle? 551 // sometimes okay to pass an INVALID handle?
556 break; 552 break;
557 } 553 }
558 // No default, so the compiler will warn us if new types get added. 554 // No default, so the compiler will warn us if new types get added.
559 } 555 }
560 if (nacl_desc.get()) 556 if (nacl_desc.get())
561 rewritten_msg->AddDescriptor(nacl_desc.release()); 557 rewritten_msg->AddDescriptor(nacl_desc.release());
562 } 558 }
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
683 header.payload_size = static_cast<uint32>(msg.payload_size()); 679 header.payload_size = static_cast<uint32>(msg.payload_size());
684 header.routing = msg.routing_id(); 680 header.routing = msg.routing_id();
685 header.type = msg.type(); 681 header.type = msg.type();
686 header.flags = msg.flags(); 682 header.flags = msg.flags();
687 header.num_fds = static_cast<int>(rewritten_msg->desc_count()); 683 header.num_fds = static_cast<int>(rewritten_msg->desc_count());
688 684
689 rewritten_msg->SetData(header, msg.payload(), msg.payload_size()); 685 rewritten_msg->SetData(header, msg.payload(), msg.payload_size());
690 locked_data_.to_be_received_.push(rewritten_msg); 686 locked_data_.to_be_received_.push(rewritten_msg);
691 } 687 }
692 688
OLDNEW
« no previous file with comments | « chrome/browser/nacl_host/nacl_process_host.cc ('k') | chrome/test/ppapi/ppapi_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698