| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 CHROMECAST_BROWSER_CAST_CONTENT_BROWSER_CLIENT_H_ | 5 #ifndef CHROMECAST_BROWSER_CAST_CONTENT_BROWSER_CLIENT_H_ |
| 6 #define CHROMECAST_BROWSER_CAST_CONTENT_BROWSER_CLIENT_H_ | 6 #define CHROMECAST_BROWSER_CAST_CONTENT_BROWSER_CLIENT_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 | 23 |
| 24 namespace breakpad { | 24 namespace breakpad { |
| 25 class CrashHandlerHostLinux; | 25 class CrashHandlerHostLinux; |
| 26 } | 26 } |
| 27 | 27 |
| 28 namespace metrics { | 28 namespace metrics { |
| 29 class MetricsService; | 29 class MetricsService; |
| 30 } | 30 } |
| 31 | 31 |
| 32 namespace net { | 32 namespace net { |
| 33 class SSLPrivateKey; |
| 33 class URLRequestContextGetter; | 34 class URLRequestContextGetter; |
| 34 class X509Certificate; | 35 class X509Certificate; |
| 35 } | 36 } |
| 36 | 37 |
| 37 namespace service_manager { | 38 namespace service_manager { |
| 38 class BinderRegistry; | 39 class BinderRegistry; |
| 39 } | 40 } |
| 40 | 41 |
| 41 namespace chromecast { | 42 namespace chromecast { |
| 42 class CastService; | 43 class CastService; |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 const GURL& request_url, | 142 const GURL& request_url, |
| 142 content::ResourceType resource_type, | 143 content::ResourceType resource_type, |
| 143 bool overridable, | 144 bool overridable, |
| 144 bool strict_enforcement, | 145 bool strict_enforcement, |
| 145 bool expired_previous_decision, | 146 bool expired_previous_decision, |
| 146 const base::Callback<void(content::CertificateRequestResultType)>& | 147 const base::Callback<void(content::CertificateRequestResultType)>& |
| 147 callback) override; | 148 callback) override; |
| 148 void SelectClientCertificate( | 149 void SelectClientCertificate( |
| 149 content::WebContents* web_contents, | 150 content::WebContents* web_contents, |
| 150 net::SSLCertRequestInfo* cert_request_info, | 151 net::SSLCertRequestInfo* cert_request_info, |
| 151 net::CertificateList client_certs, | 152 net::ClientCertIdentityList client_certs, |
| 152 std::unique_ptr<content::ClientCertificateDelegate> delegate) override; | 153 std::unique_ptr<content::ClientCertificateDelegate> delegate) override; |
| 153 bool CanCreateWindow(content::RenderFrameHost* opener, | 154 bool CanCreateWindow(content::RenderFrameHost* opener, |
| 154 const GURL& opener_url, | 155 const GURL& opener_url, |
| 155 const GURL& opener_top_level_frame_url, | 156 const GURL& opener_top_level_frame_url, |
| 156 const GURL& source_origin, | 157 const GURL& source_origin, |
| 157 content::mojom::WindowContainerType container_type, | 158 content::mojom::WindowContainerType container_type, |
| 158 const GURL& target_url, | 159 const GURL& target_url, |
| 159 const content::Referrer& referrer, | 160 const content::Referrer& referrer, |
| 160 const std::string& frame_name, | 161 const std::string& frame_name, |
| 161 WindowOpenDisposition disposition, | 162 WindowOpenDisposition disposition, |
| (...skipping 20 matching lines...) Expand all Loading... |
| 182 CastContentBrowserClient(); | 183 CastContentBrowserClient(); |
| 183 | 184 |
| 184 URLRequestContextFactory* url_request_context_factory() const { | 185 URLRequestContextFactory* url_request_context_factory() const { |
| 185 return url_request_context_factory_.get(); | 186 return url_request_context_factory_.get(); |
| 186 } | 187 } |
| 187 | 188 |
| 188 private: | 189 private: |
| 189 void AddNetworkHintsMessageFilter(int render_process_id, | 190 void AddNetworkHintsMessageFilter(int render_process_id, |
| 190 net::URLRequestContext* context); | 191 net::URLRequestContext* context); |
| 191 | 192 |
| 192 net::X509Certificate* SelectClientCertificateOnIOThread( | 193 void SelectClientCertificateOnIOThread( |
| 193 GURL requesting_url, | 194 GURL requesting_url, |
| 194 int render_process_id); | 195 int render_process_id, |
| 195 | 196 scoped_refptr<base::SequencedTaskRunner> original_runner, |
| 197 const base::Callback<void(scoped_refptr<net::X509Certificate>, |
| 198 scoped_refptr<net::SSLPrivateKey>)>& |
| 199 continue_callback); |
| 196 #if !defined(OS_ANDROID) | 200 #if !defined(OS_ANDROID) |
| 197 // Returns the crash signal FD corresponding to the current process type. | 201 // Returns the crash signal FD corresponding to the current process type. |
| 198 int GetCrashSignalFD(const base::CommandLine& command_line); | 202 int GetCrashSignalFD(const base::CommandLine& command_line); |
| 199 | 203 |
| 200 // Creates a CrashHandlerHost instance for the given process type. | 204 // Creates a CrashHandlerHost instance for the given process type. |
| 201 breakpad::CrashHandlerHostLinux* CreateCrashHandlerHost( | 205 breakpad::CrashHandlerHostLinux* CreateCrashHandlerHost( |
| 202 const std::string& process_type); | 206 const std::string& process_type); |
| 203 | 207 |
| 204 // A static cache to hold crash_handlers for each process_type | 208 // A static cache to hold crash_handlers for each process_type |
| 205 std::map<std::string, breakpad::CrashHandlerHostLinux*> crash_handlers_; | 209 std::map<std::string, breakpad::CrashHandlerHostLinux*> crash_handlers_; |
| 206 #endif // !defined(OS_ANDROID) | 210 #endif // !defined(OS_ANDROID) |
| 207 | 211 |
| 208 // Created by CastContentBrowserClient but owned by BrowserMainLoop. | 212 // Created by CastContentBrowserClient but owned by BrowserMainLoop. |
| 209 CastBrowserMainParts* cast_browser_main_parts_; | 213 CastBrowserMainParts* cast_browser_main_parts_; |
| 210 std::unique_ptr<URLRequestContextFactory> url_request_context_factory_; | 214 std::unique_ptr<URLRequestContextFactory> url_request_context_factory_; |
| 211 std::unique_ptr<CastResourceDispatcherHostDelegate> | 215 std::unique_ptr<CastResourceDispatcherHostDelegate> |
| 212 resource_dispatcher_host_delegate_; | 216 resource_dispatcher_host_delegate_; |
| 213 std::unique_ptr<media::MediaPipelineBackendFactory> | 217 std::unique_ptr<media::MediaPipelineBackendFactory> |
| 214 media_pipeline_backend_factory_; | 218 media_pipeline_backend_factory_; |
| 215 | 219 |
| 216 DISALLOW_COPY_AND_ASSIGN(CastContentBrowserClient); | 220 DISALLOW_COPY_AND_ASSIGN(CastContentBrowserClient); |
| 217 }; | 221 }; |
| 218 | 222 |
| 219 } // namespace shell | 223 } // namespace shell |
| 220 } // namespace chromecast | 224 } // namespace chromecast |
| 221 | 225 |
| 222 #endif // CHROMECAST_BROWSER_CAST_CONTENT_BROWSER_CLIENT_H_ | 226 #endif // CHROMECAST_BROWSER_CAST_CONTENT_BROWSER_CLIENT_H_ |
| OLD | NEW |