| 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 "content/browser/ppapi_plugin_process_host.h" | 5 #include "content/browser/ppapi_plugin_process_host.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 472 base::ProcessId process_id = base::kNullProcessId; | 472 base::ProcessId process_id = base::kNullProcessId; |
| 473 if (process_handle != base::kNullProcessHandle) { | 473 if (process_handle != base::kNullProcessHandle) { |
| 474 // This channel is not used by the browser itself. | 474 // This channel is not used by the browser itself. |
| 475 process_id = base::GetProcId(process_handle); | 475 process_id = base::GetProcId(process_handle); |
| 476 CHECK_NE(base::kNullProcessId, process_id); | 476 CHECK_NE(base::kNullProcessId, process_id); |
| 477 } | 477 } |
| 478 | 478 |
| 479 // We can't send any sync messages from the browser because it might lead to | 479 // We can't send any sync messages from the browser because it might lead to |
| 480 // a hang. See the similar code in PluginProcessHost for more description. | 480 // a hang. See the similar code in PluginProcessHost for more description. |
| 481 PpapiMsg_CreateChannel* msg = new PpapiMsg_CreateChannel( | 481 PpapiMsg_CreateChannel* msg = new PpapiMsg_CreateChannel( |
| 482 process_id, renderer_child_id, client->OffTheRecord()); | 482 process_id, renderer_child_id, client->Incognito()); |
| 483 msg->set_unblock(true); | 483 msg->set_unblock(true); |
| 484 if (Send(msg)) { | 484 if (Send(msg)) { |
| 485 sent_requests_.push(client); | 485 sent_requests_.push(client); |
| 486 } else { | 486 } else { |
| 487 client->OnPpapiChannelOpened(IPC::ChannelHandle(), base::kNullProcessId, 0); | 487 client->OnPpapiChannelOpened(IPC::ChannelHandle(), base::kNullProcessId, 0); |
| 488 } | 488 } |
| 489 } | 489 } |
| 490 | 490 |
| 491 void PpapiPluginProcessHost::OnProcessLaunched() { | 491 void PpapiPluginProcessHost::OnProcessLaunched() { |
| 492 VLOG(2) << "ppapi plugin process launched."; | 492 VLOG(2) << "ppapi plugin process launched."; |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 560 // sent_requests_ queue should be the one that the plugin just created. | 560 // sent_requests_ queue should be the one that the plugin just created. |
| 561 Client* client = sent_requests_.front(); | 561 Client* client = sent_requests_.front(); |
| 562 sent_requests_.pop(); | 562 sent_requests_.pop(); |
| 563 | 563 |
| 564 const ChildProcessData& data = process_->GetData(); | 564 const ChildProcessData& data = process_->GetData(); |
| 565 client->OnPpapiChannelOpened(channel_handle, base::GetProcId(data.handle), | 565 client->OnPpapiChannelOpened(channel_handle, base::GetProcId(data.handle), |
| 566 data.id); | 566 data.id); |
| 567 } | 567 } |
| 568 | 568 |
| 569 } // namespace content | 569 } // namespace content |
| OLD | NEW |