| 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 #ifndef CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_NETWORK_PROXY_HOST_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_NETWORK_PROXY_HOST_H_ |
| 6 #define CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_NETWORK_PROXY_HOST_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_NETWORK_PROXY_HOST_H_ |
| 7 | 7 |
| 8 #include <queue> | 8 #include <queue> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 // We retrieve the appropriate URLRequestContextGetter and whether this API | 43 // We retrieve the appropriate URLRequestContextGetter and whether this API |
| 44 // is allowed for the instance on the UI thread and pass those to | 44 // is allowed for the instance on the UI thread and pass those to |
| 45 // DidGetUIThreadData, which sets allowed_ and proxy_service_. | 45 // DidGetUIThreadData, which sets allowed_ and proxy_service_. |
| 46 struct UIThreadData { | 46 struct UIThreadData { |
| 47 UIThreadData(); | 47 UIThreadData(); |
| 48 ~UIThreadData(); | 48 ~UIThreadData(); |
| 49 bool is_allowed; | 49 bool is_allowed; |
| 50 scoped_refptr<net::URLRequestContextGetter> context_getter; | 50 scoped_refptr<net::URLRequestContextGetter> context_getter; |
| 51 }; | 51 }; |
| 52 static UIThreadData GetUIThreadDataOnUIThread(int render_process_id, | 52 static UIThreadData GetUIThreadDataOnUIThread(int render_process_id, |
| 53 int render_view_id, | 53 int render_frame_id, |
| 54 bool is_external_plugin); | 54 bool is_external_plugin); |
| 55 void DidGetUIThreadData(const UIThreadData&); | 55 void DidGetUIThreadData(const UIThreadData&); |
| 56 | 56 |
| 57 // ResourceHost implementation. | 57 // ResourceHost implementation. |
| 58 virtual int32_t OnResourceMessageReceived( | 58 virtual int32_t OnResourceMessageReceived( |
| 59 const IPC::Message& msg, | 59 const IPC::Message& msg, |
| 60 ppapi::host::HostMessageContext* context) OVERRIDE; | 60 ppapi::host::HostMessageContext* context) OVERRIDE; |
| 61 | 61 |
| 62 int32_t OnMsgGetProxyForURL(ppapi::host::HostMessageContext* context, | 62 int32_t OnMsgGetProxyForURL(ppapi::host::HostMessageContext* context, |
| 63 const std::string& url); | 63 const std::string& url); |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 std::queue<net::ProxyService::PacRequest*> pending_requests_; | 95 std::queue<net::ProxyService::PacRequest*> pending_requests_; |
| 96 | 96 |
| 97 base::WeakPtrFactory<PepperNetworkProxyHost> weak_factory_; | 97 base::WeakPtrFactory<PepperNetworkProxyHost> weak_factory_; |
| 98 | 98 |
| 99 DISALLOW_COPY_AND_ASSIGN(PepperNetworkProxyHost); | 99 DISALLOW_COPY_AND_ASSIGN(PepperNetworkProxyHost); |
| 100 }; | 100 }; |
| 101 | 101 |
| 102 } // namespace content | 102 } // namespace content |
| 103 | 103 |
| 104 #endif // CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_NETWORK_PROXY_HOST_H_ | 104 #endif // CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_NETWORK_PROXY_HOST_H_ |
| OLD | NEW |