| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/renderer_host/pepper/pepper_network_proxy_host.h" | 5 #include "content/browser/renderer_host/pepper/pepper_network_proxy_host.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "content/browser/renderer_host/pepper/browser_ppapi_host_impl.h" | 8 #include "content/browser/renderer_host/pepper/browser_ppapi_host_impl.h" |
| 9 #include "content/browser/renderer_host/pepper/pepper_socket_utils.h" | 9 #include "content/browser/renderer_host/pepper/pepper_socket_utils.h" |
| 10 #include "content/public/browser/browser_context.h" | 10 #include "content/public/browser/browser_context.h" |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 false /* is_private_api */, | 86 false /* is_private_api */, |
| 87 request, | 87 request, |
| 88 render_view_host); | 88 render_view_host); |
| 89 } | 89 } |
| 90 return result; | 90 return result; |
| 91 } | 91 } |
| 92 | 92 |
| 93 void PepperNetworkProxyHost::DidGetUIThreadData( | 93 void PepperNetworkProxyHost::DidGetUIThreadData( |
| 94 const UIThreadData& ui_thread_data) { | 94 const UIThreadData& ui_thread_data) { |
| 95 is_allowed_ = ui_thread_data.is_allowed; | 95 is_allowed_ = ui_thread_data.is_allowed; |
| 96 if (ui_thread_data.context_getter && | 96 if (ui_thread_data.context_getter.get() && |
| 97 ui_thread_data.context_getter->GetURLRequestContext()) { | 97 ui_thread_data.context_getter->GetURLRequestContext()) { |
| 98 proxy_service_ = | 98 proxy_service_ = |
| 99 ui_thread_data.context_getter->GetURLRequestContext()->proxy_service(); | 99 ui_thread_data.context_getter->GetURLRequestContext()->proxy_service(); |
| 100 } | 100 } |
| 101 waiting_for_ui_thread_data_ = false; | 101 waiting_for_ui_thread_data_ = false; |
| 102 if (!proxy_service_) { | 102 if (!proxy_service_) { |
| 103 DLOG_IF(WARNING, proxy_service_) | 103 DLOG_IF(WARNING, proxy_service_) |
| 104 << "Failed to find a ProxyService for Pepper plugin."; | 104 << "Failed to find a ProxyService for Pepper plugin."; |
| 105 } | 105 } |
| 106 TryToSendUnsentRequests(); | 106 TryToSendUnsentRequests(); |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 void PepperNetworkProxyHost::SendFailureReply( | 186 void PepperNetworkProxyHost::SendFailureReply( |
| 187 int32_t error, | 187 int32_t error, |
| 188 ppapi::host::ReplyMessageContext context) { | 188 ppapi::host::ReplyMessageContext context) { |
| 189 context.params.set_result(error); | 189 context.params.set_result(error); |
| 190 host()->SendReply(context, | 190 host()->SendReply(context, |
| 191 PpapiPluginMsg_NetworkProxy_GetProxyForURLReply( | 191 PpapiPluginMsg_NetworkProxy_GetProxyForURLReply( |
| 192 std::string())); | 192 std::string())); |
| 193 } | 193 } |
| 194 | 194 |
| 195 } // namespace content | 195 } // namespace content |
| OLD | NEW |