| OLD | NEW |
| 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 Loading... |
| 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; |
| 549 case ppapi::proxy::SerializedHandle::INVALID: { | 553 case ppapi::proxy::SerializedHandle::INVALID: { |
| 550 // Nothing to do. TODO(dmichael): Should we log this? Or is it | 554 // Nothing to do. TODO(dmichael): Should we log this? Or is it |
| 551 // sometimes okay to pass an INVALID handle? | 555 // sometimes okay to pass an INVALID handle? |
| 552 break; | 556 break; |
| 553 } | 557 } |
| 554 // No default, so the compiler will warn us if new types get added. | 558 // No default, so the compiler will warn us if new types get added. |
| 555 } | 559 } |
| 556 if (nacl_desc.get()) | 560 if (nacl_desc.get()) |
| 557 rewritten_msg->AddDescriptor(nacl_desc.release()); | 561 rewritten_msg->AddDescriptor(nacl_desc.release()); |
| 558 } | 562 } |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 679 header.payload_size = static_cast<uint32>(msg.payload_size()); | 683 header.payload_size = static_cast<uint32>(msg.payload_size()); |
| 680 header.routing = msg.routing_id(); | 684 header.routing = msg.routing_id(); |
| 681 header.type = msg.type(); | 685 header.type = msg.type(); |
| 682 header.flags = msg.flags(); | 686 header.flags = msg.flags(); |
| 683 header.num_fds = static_cast<int>(rewritten_msg->desc_count()); | 687 header.num_fds = static_cast<int>(rewritten_msg->desc_count()); |
| 684 | 688 |
| 685 rewritten_msg->SetData(header, msg.payload(), msg.payload_size()); | 689 rewritten_msg->SetData(header, msg.payload(), msg.payload_size()); |
| 686 locked_data_.to_be_received_.push(rewritten_msg); | 690 locked_data_.to_be_received_.push(rewritten_msg); |
| 687 } | 691 } |
| 688 | 692 |
| OLD | NEW |