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 1141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1152 *hint)); | 1152 *hint)); |
1153 } | 1153 } |
1154 } | 1154 } |
1155 | 1155 |
1156 void PepperPluginDelegateImpl::UnregisterHostResolver(uint32 host_resolver_id) { | 1156 void PepperPluginDelegateImpl::UnregisterHostResolver(uint32 host_resolver_id) { |
1157 host_resolvers_.Remove(host_resolver_id); | 1157 host_resolvers_.Remove(host_resolver_id); |
1158 } | 1158 } |
1159 | 1159 |
1160 bool PepperPluginDelegateImpl::AddNetworkListObserver( | 1160 bool PepperPluginDelegateImpl::AddNetworkListObserver( |
1161 webkit_glue::NetworkListObserver* observer) { | 1161 webkit_glue::NetworkListObserver* observer) { |
1162 #if defined(ENABLE_P2P_APIS) | 1162 #if defined(ENABLE_WEBRTC) |
1163 P2PSocketDispatcher* socket_dispatcher = | 1163 P2PSocketDispatcher* socket_dispatcher = |
1164 render_view_->p2p_socket_dispatcher(); | 1164 render_view_->p2p_socket_dispatcher(); |
1165 if (!socket_dispatcher) { | 1165 if (!socket_dispatcher) { |
1166 return false; | 1166 return false; |
1167 } | 1167 } |
1168 socket_dispatcher->AddNetworkListObserver(observer); | 1168 socket_dispatcher->AddNetworkListObserver(observer); |
1169 return true; | 1169 return true; |
1170 #else | 1170 #else |
1171 return false; | 1171 return false; |
1172 #endif | 1172 #endif |
1173 } | 1173 } |
1174 | 1174 |
1175 void PepperPluginDelegateImpl::RemoveNetworkListObserver( | 1175 void PepperPluginDelegateImpl::RemoveNetworkListObserver( |
1176 webkit_glue::NetworkListObserver* observer) { | 1176 webkit_glue::NetworkListObserver* observer) { |
1177 #if defined(ENABLE_P2P_APIS) | 1177 #if defined(ENABLE_WEBRTC) |
1178 P2PSocketDispatcher* socket_dispatcher = | 1178 P2PSocketDispatcher* socket_dispatcher = |
1179 render_view_->p2p_socket_dispatcher(); | 1179 render_view_->p2p_socket_dispatcher(); |
1180 if (socket_dispatcher) | 1180 if (socket_dispatcher) |
1181 socket_dispatcher->RemoveNetworkListObserver(observer); | 1181 socket_dispatcher->RemoveNetworkListObserver(observer); |
1182 #endif | 1182 #endif |
1183 } | 1183 } |
1184 | 1184 |
1185 bool PepperPluginDelegateImpl::X509CertificateParseDER( | 1185 bool PepperPluginDelegateImpl::X509CertificateParseDER( |
1186 const std::vector<char>& der, | 1186 const std::vector<char>& der, |
1187 ppapi::PPB_X509Certificate_Fields* fields) { | 1187 ppapi::PPB_X509Certificate_Fields* fields) { |
(...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1684 mouse_lock_instances_.erase(it); | 1684 mouse_lock_instances_.erase(it); |
1685 } | 1685 } |
1686 } | 1686 } |
1687 | 1687 |
1688 webkit_glue::ClipboardClient* | 1688 webkit_glue::ClipboardClient* |
1689 PepperPluginDelegateImpl::CreateClipboardClient() const { | 1689 PepperPluginDelegateImpl::CreateClipboardClient() const { |
1690 return new RendererClipboardClient; | 1690 return new RendererClipboardClient; |
1691 } | 1691 } |
1692 | 1692 |
1693 } // namespace content | 1693 } // namespace content |
OLD | NEW |