| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/browser/plugin_process_host.h" | 5 #include "chrome/browser/plugin_process_host.h" |
| 6 | 6 |
| 7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
| 8 #include <windows.h> | 8 #include <windows.h> |
| 9 #elif defined(OS_POSIX) | 9 #elif defined(OS_POSIX) |
| 10 #include <utility> // for pair<> | 10 #include <utility> // for pair<> |
| (...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 505 #endif | 505 #endif |
| 506 #if defined(OS_MACOSX) | 506 #if defined(OS_MACOSX) |
| 507 IPC_MESSAGE_HANDLER(PluginProcessHostMsg_PluginSelectWindow, | 507 IPC_MESSAGE_HANDLER(PluginProcessHostMsg_PluginSelectWindow, |
| 508 OnPluginSelectWindow) | 508 OnPluginSelectWindow) |
| 509 IPC_MESSAGE_HANDLER(PluginProcessHostMsg_PluginShowWindow, | 509 IPC_MESSAGE_HANDLER(PluginProcessHostMsg_PluginShowWindow, |
| 510 OnPluginShowWindow) | 510 OnPluginShowWindow) |
| 511 IPC_MESSAGE_HANDLER(PluginProcessHostMsg_PluginHideWindow, | 511 IPC_MESSAGE_HANDLER(PluginProcessHostMsg_PluginHideWindow, |
| 512 OnPluginHideWindow) | 512 OnPluginHideWindow) |
| 513 IPC_MESSAGE_HANDLER(PluginProcessHostMsg_PluginDisposeWindow, | 513 IPC_MESSAGE_HANDLER(PluginProcessHostMsg_PluginDisposeWindow, |
| 514 OnPluginDisposeWindow) | 514 OnPluginDisposeWindow) |
| 515 IPC_MESSAGE_HANDLER(PluginProcessHostMsg_PluginReceivedFocus, |
| 516 OnPluginReceivedFocus) |
| 515 #endif | 517 #endif |
| 516 IPC_MESSAGE_UNHANDLED_ERROR() | 518 IPC_MESSAGE_UNHANDLED_ERROR() |
| 517 IPC_END_MESSAGE_MAP() | 519 IPC_END_MESSAGE_MAP() |
| 518 } | 520 } |
| 519 | 521 |
| 520 void PluginProcessHost::OnChannelConnected(int32 peer_pid) { | 522 void PluginProcessHost::OnChannelConnected(int32 peer_pid) { |
| 521 for (size_t i = 0; i < pending_requests_.size(); ++i) { | 523 for (size_t i = 0; i < pending_requests_.size(); ++i) { |
| 522 RequestPluginChannel(pending_requests_[i].renderer_message_filter_.get(), | 524 RequestPluginChannel(pending_requests_[i].renderer_message_filter_.get(), |
| 523 pending_requests_[i].mime_type, | 525 pending_requests_[i].mime_type, |
| 524 pending_requests_[i].reply_msg); | 526 pending_requests_[i].reply_msg); |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 678 const std::vector<uint8>& data) { | 680 const std::vector<uint8>& data) { |
| 679 DCHECK(ChromeThread::CurrentlyOn(ChromeThread::IO)); | 681 DCHECK(ChromeThread::CurrentlyOn(ChromeThread::IO)); |
| 680 | 682 |
| 681 ChromePluginLib *chrome_plugin = ChromePluginLib::Find(info_.path); | 683 ChromePluginLib *chrome_plugin = ChromePluginLib::Find(info_.path); |
| 682 if (chrome_plugin) { | 684 if (chrome_plugin) { |
| 683 void *data_ptr = const_cast<void*>(reinterpret_cast<const void*>(&data[0])); | 685 void *data_ptr = const_cast<void*>(reinterpret_cast<const void*>(&data[0])); |
| 684 uint32 data_len = static_cast<uint32>(data.size()); | 686 uint32 data_len = static_cast<uint32>(data.size()); |
| 685 chrome_plugin->functions().on_message(data_ptr, data_len); | 687 chrome_plugin->functions().on_message(data_ptr, data_len); |
| 686 } | 688 } |
| 687 } | 689 } |
| OLD | NEW |