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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 } | 60 } |
61 | 61 |
62 PepperNetworkProxyHost::UIThreadData::~UIThreadData() { | 62 PepperNetworkProxyHost::UIThreadData::~UIThreadData() { |
63 } | 63 } |
64 | 64 |
65 // static | 65 // static |
66 PepperNetworkProxyHost::UIThreadData | 66 PepperNetworkProxyHost::UIThreadData |
67 PepperNetworkProxyHost::GetUIThreadDataOnUIThread(int render_process_id, | 67 PepperNetworkProxyHost::GetUIThreadDataOnUIThread(int render_process_id, |
68 int render_frame_id, | 68 int render_frame_id, |
69 bool is_external_plugin) { | 69 bool is_external_plugin) { |
70 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 70 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
71 PepperNetworkProxyHost::UIThreadData result; | 71 PepperNetworkProxyHost::UIThreadData result; |
72 RenderProcessHost* render_process_host = | 72 RenderProcessHost* render_process_host = |
73 RenderProcessHost::FromID(render_process_id); | 73 RenderProcessHost::FromID(render_process_id); |
74 if (render_process_host && render_process_host->GetBrowserContext()) { | 74 if (render_process_host && render_process_host->GetBrowserContext()) { |
75 result.context_getter = render_process_host->GetBrowserContext()-> | 75 result.context_getter = render_process_host->GetBrowserContext()-> |
76 GetRequestContextForRenderProcess(render_process_id); | 76 GetRequestContextForRenderProcess(render_process_id); |
77 } | 77 } |
78 | 78 |
79 SocketPermissionRequest request( | 79 SocketPermissionRequest request( |
80 content::SocketPermissionRequest::RESOLVE_PROXY, std::string(), 0); | 80 content::SocketPermissionRequest::RESOLVE_PROXY, std::string(), 0); |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 void PepperNetworkProxyHost::SendFailureReply( | 183 void PepperNetworkProxyHost::SendFailureReply( |
184 int32_t error, | 184 int32_t error, |
185 ppapi::host::ReplyMessageContext context) { | 185 ppapi::host::ReplyMessageContext context) { |
186 context.params.set_result(error); | 186 context.params.set_result(error); |
187 host()->SendReply(context, | 187 host()->SendReply(context, |
188 PpapiPluginMsg_NetworkProxy_GetProxyForURLReply( | 188 PpapiPluginMsg_NetworkProxy_GetProxyForURLReply( |
189 std::string())); | 189 std::string())); |
190 } | 190 } |
191 | 191 |
192 } // namespace content | 192 } // namespace content |
OLD | NEW |