| 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/renderer/pepper/pepper_plugin_delegate_impl.h" | 5 #include "content/renderer/pepper/pepper_plugin_delegate_impl.h" |
| 6 | 6 |
| 7 #include <cmath> | 7 #include <cmath> |
| 8 #include <cstddef> | 8 #include <cstddef> |
| 9 #include <map> | 9 #include <map> |
| 10 #include <queue> | 10 #include <queue> |
| (...skipping 1487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1498 MessageLoop::current()->PostTask( | 1498 MessageLoop::current()->PostTask( |
| 1499 FROM_HERE, | 1499 FROM_HERE, |
| 1500 base::Bind( | 1500 base::Bind( |
| 1501 &PepperDeviceEnumerationEventHandler::OnDevicesEnumerationFailed, | 1501 &PepperDeviceEnumerationEventHandler::OnDevicesEnumerationFailed, |
| 1502 device_enumeration_event_handler_->AsWeakPtr(), request_id)); | 1502 device_enumeration_event_handler_->AsWeakPtr(), request_id)); |
| 1503 #endif | 1503 #endif |
| 1504 | 1504 |
| 1505 return request_id; | 1505 return request_id; |
| 1506 } | 1506 } |
| 1507 | 1507 |
| 1508 void PepperPluginDelegateImpl::StopEnumerateDevices(int request_id) { |
| 1509 #if defined(ENABLE_WEBRTC) |
| 1510 // Need to post task since this function might be called inside the callback |
| 1511 // of EnumerateDevices. |
| 1512 MessageLoop::current()->PostTask( |
| 1513 FROM_HERE, |
| 1514 base::Bind( |
| 1515 &MediaStreamDispatcher::StopEnumerateDevices, |
| 1516 base::Unretained(render_view_->media_stream_dispatcher()), |
| 1517 request_id, device_enumeration_event_handler_.get()->AsWeakPtr())); |
| 1518 #endif |
| 1519 } |
| 1520 |
| 1508 bool PepperPluginDelegateImpl::OnMessageReceived(const IPC::Message& message) { | 1521 bool PepperPluginDelegateImpl::OnMessageReceived(const IPC::Message& message) { |
| 1509 bool handled = true; | 1522 bool handled = true; |
| 1510 IPC_BEGIN_MESSAGE_MAP(PepperPluginDelegateImpl, message) | 1523 IPC_BEGIN_MESSAGE_MAP(PepperPluginDelegateImpl, message) |
| 1511 IPC_MESSAGE_HANDLER(PpapiMsg_PPBTCPSocket_ConnectACK, | 1524 IPC_MESSAGE_HANDLER(PpapiMsg_PPBTCPSocket_ConnectACK, |
| 1512 OnTCPSocketConnectACK) | 1525 OnTCPSocketConnectACK) |
| 1513 IPC_MESSAGE_HANDLER(PpapiMsg_PPBTCPSocket_SSLHandshakeACK, | 1526 IPC_MESSAGE_HANDLER(PpapiMsg_PPBTCPSocket_SSLHandshakeACK, |
| 1514 OnTCPSocketSSLHandshakeACK) | 1527 OnTCPSocketSSLHandshakeACK) |
| 1515 IPC_MESSAGE_HANDLER(PpapiMsg_PPBTCPSocket_ReadACK, OnTCPSocketReadACK) | 1528 IPC_MESSAGE_HANDLER(PpapiMsg_PPBTCPSocket_ReadACK, OnTCPSocketReadACK) |
| 1516 IPC_MESSAGE_HANDLER(PpapiMsg_PPBTCPSocket_WriteACK, OnTCPSocketWriteACK) | 1529 IPC_MESSAGE_HANDLER(PpapiMsg_PPBTCPSocket_WriteACK, OnTCPSocketWriteACK) |
| 1517 IPC_MESSAGE_HANDLER(PpapiMsg_PPBUDPSocket_BindACK, OnUDPSocketBindACK) | 1530 IPC_MESSAGE_HANDLER(PpapiMsg_PPBUDPSocket_BindACK, OnUDPSocketBindACK) |
| (...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1763 else | 1776 else |
| 1764 return render_view_->mouse_lock_dispatcher(); | 1777 return render_view_->mouse_lock_dispatcher(); |
| 1765 } | 1778 } |
| 1766 | 1779 |
| 1767 webkit_glue::ClipboardClient* | 1780 webkit_glue::ClipboardClient* |
| 1768 PepperPluginDelegateImpl::CreateClipboardClient() const { | 1781 PepperPluginDelegateImpl::CreateClipboardClient() const { |
| 1769 return new RendererClipboardClient; | 1782 return new RendererClipboardClient; |
| 1770 } | 1783 } |
| 1771 | 1784 |
| 1772 } // namespace content | 1785 } // namespace content |
| OLD | NEW |