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