| 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> |
| 11 #include <vector> | 11 #include <vector> |
| 12 | 12 |
| 13 #include "base/callback_forward.h" |
| 13 #include "base/macros.h" | 14 #include "base/macros.h" |
| 14 #include "build/build_config.h" | 15 #include "build/build_config.h" |
| 15 #include "content/public/browser/certificate_request_result_type.h" | 16 #include "content/public/browser/certificate_request_result_type.h" |
| 16 #include "content/public/browser/content_browser_client.h" | 17 #include "content/public/browser/content_browser_client.h" |
| 17 | 18 |
| 18 class PrefService; | 19 class PrefService; |
| 19 | 20 |
| 20 namespace breakpad { | 21 namespace breakpad { |
| 21 class CrashHandlerHostLinux; | 22 class CrashHandlerHostLinux; |
| 22 } | 23 } |
| (...skipping 23 matching lines...) Expand all Loading... |
| 46 class MediaResourceTracker; | 47 class MediaResourceTracker; |
| 47 class VideoPlaneController; | 48 class VideoPlaneController; |
| 48 class VideoResolutionPolicy; | 49 class VideoResolutionPolicy; |
| 49 } | 50 } |
| 50 | 51 |
| 51 namespace shell { | 52 namespace shell { |
| 52 | 53 |
| 53 class CastBrowserMainParts; | 54 class CastBrowserMainParts; |
| 54 class URLRequestContextFactory; | 55 class URLRequestContextFactory; |
| 55 | 56 |
| 57 using DisableQuicClosure = base::OnceClosure; |
| 58 |
| 56 class CastContentBrowserClient : public content::ContentBrowserClient { | 59 class CastContentBrowserClient : public content::ContentBrowserClient { |
| 57 public: | 60 public: |
| 58 // Creates an implementation of CastContentBrowserClient. Platform should | 61 // Creates an implementation of CastContentBrowserClient. Platform should |
| 59 // link in an implementation as needed. | 62 // link in an implementation as needed. |
| 60 static std::unique_ptr<CastContentBrowserClient> Create(); | 63 static std::unique_ptr<CastContentBrowserClient> Create(); |
| 61 | 64 |
| 62 ~CastContentBrowserClient() override; | 65 ~CastContentBrowserClient() override; |
| 63 | 66 |
| 64 // Appends extra command line arguments before launching a new process. | 67 // Appends extra command line arguments before launching a new process. |
| 65 virtual void AppendExtraCommandLineSwitches(base::CommandLine* command_line); | 68 virtual void AppendExtraCommandLineSwitches(base::CommandLine* command_line); |
| 66 | 69 |
| 67 // Hook for code to run before browser threads created. | 70 // Hook for code to run before browser threads created. |
| 68 virtual void PreCreateThreads(); | 71 virtual void PreCreateThreads(); |
| 69 | 72 |
| 70 // Creates and returns the CastService instance for the current process. | 73 // Creates and returns the CastService instance for the current process. |
| 71 // Note: |request_context_getter| might be different than the main request | 74 // Note: |request_context_getter| might be different than the main request |
| 72 // getter accessible via CastBrowserProcess. | 75 // getter accessible via CastBrowserProcess. |
| 73 virtual std::unique_ptr<CastService> CreateCastService( | 76 virtual std::unique_ptr<CastService> CreateCastService( |
| 74 content::BrowserContext* browser_context, | 77 content::BrowserContext* browser_context, |
| 75 PrefService* pref_service, | 78 PrefService* pref_service, |
| 76 net::URLRequestContextGetter* request_context_getter, | 79 net::URLRequestContextGetter* request_context_getter, |
| 80 DisableQuicClosure disable_quic_closure, |
| 77 media::VideoPlaneController* video_plane_controller, | 81 media::VideoPlaneController* video_plane_controller, |
| 78 CastWindowManager* window_manager); | 82 CastWindowManager* window_manager); |
| 79 | 83 |
| 80 #if !defined(OS_ANDROID) | 84 #if !defined(OS_ANDROID) |
| 81 // Gets object for enforcing video resolution policy restrictions. | 85 // Gets object for enforcing video resolution policy restrictions. |
| 82 virtual media::VideoResolutionPolicy* GetVideoResolutionPolicy(); | 86 virtual media::VideoResolutionPolicy* GetVideoResolutionPolicy(); |
| 83 | 87 |
| 84 // Returns the task runner that must be used for media IO. | 88 // Returns the task runner that must be used for media IO. |
| 85 scoped_refptr<base::SingleThreadTaskRunner> GetMediaTaskRunner(); | 89 scoped_refptr<base::SingleThreadTaskRunner> GetMediaTaskRunner(); |
| 86 | 90 |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 CastBrowserMainParts* cast_browser_main_parts_; | 202 CastBrowserMainParts* cast_browser_main_parts_; |
| 199 std::unique_ptr<URLRequestContextFactory> url_request_context_factory_; | 203 std::unique_ptr<URLRequestContextFactory> url_request_context_factory_; |
| 200 | 204 |
| 201 DISALLOW_COPY_AND_ASSIGN(CastContentBrowserClient); | 205 DISALLOW_COPY_AND_ASSIGN(CastContentBrowserClient); |
| 202 }; | 206 }; |
| 203 | 207 |
| 204 } // namespace shell | 208 } // namespace shell |
| 205 } // namespace chromecast | 209 } // namespace chromecast |
| 206 | 210 |
| 207 #endif // CHROMECAST_BROWSER_CAST_CONTENT_BROWSER_CLIENT_H_ | 211 #endif // CHROMECAST_BROWSER_CAST_CONTENT_BROWSER_CLIENT_H_ |
| OLD | NEW |