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