| 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 class MediaPipelineBackendManager; | 42 class MediaPipelineBackendManager; |
| 43 struct MediaPipelineDeviceParams; | 43 struct MediaPipelineDeviceParams; |
| 44 class MediaResourceTracker; | 44 class MediaResourceTracker; |
| 45 class VideoPlaneController; | 45 class VideoPlaneController; |
| 46 class VideoResolutionPolicy; | 46 class VideoResolutionPolicy; |
| 47 } | 47 } |
| 48 | 48 |
| 49 namespace shell { | 49 namespace shell { |
| 50 | 50 |
| 51 class CastBrowserMainParts; | 51 class CastBrowserMainParts; |
| 52 class CastWindowManager; |
| 52 class URLRequestContextFactory; | 53 class URLRequestContextFactory; |
| 53 | 54 |
| 54 class CastContentBrowserClient : public content::ContentBrowserClient { | 55 class CastContentBrowserClient : public content::ContentBrowserClient { |
| 55 public: | 56 public: |
| 56 // Creates an implementation of CastContentBrowserClient. Platform should | 57 // Creates an implementation of CastContentBrowserClient. Platform should |
| 57 // link in an implementation as needed. | 58 // link in an implementation as needed. |
| 58 static std::unique_ptr<CastContentBrowserClient> Create(); | 59 static std::unique_ptr<CastContentBrowserClient> Create(); |
| 59 | 60 |
| 60 ~CastContentBrowserClient() override; | 61 ~CastContentBrowserClient() override; |
| 61 | 62 |
| 62 // Appends extra command line arguments before launching a new process. | 63 // Appends extra command line arguments before launching a new process. |
| 63 virtual void AppendExtraCommandLineSwitches(base::CommandLine* command_line); | 64 virtual void AppendExtraCommandLineSwitches(base::CommandLine* command_line); |
| 64 | 65 |
| 65 // Hook for code to run before browser threads created. | 66 // Hook for code to run before browser threads created. |
| 66 virtual void PreCreateThreads(); | 67 virtual void PreCreateThreads(); |
| 67 | 68 |
| 68 // Creates and returns the CastService instance for the current process. | 69 // Creates and returns the CastService instance for the current process. |
| 69 // Note: |request_context_getter| might be different than the main request | 70 // Note: |request_context_getter| might be different than the main request |
| 70 // getter accessible via CastBrowserProcess. | 71 // getter accessible via CastBrowserProcess. |
| 71 virtual std::unique_ptr<CastService> CreateCastService( | 72 virtual std::unique_ptr<CastService> CreateCastService( |
| 72 content::BrowserContext* browser_context, | 73 content::BrowserContext* browser_context, |
| 73 PrefService* pref_service, | 74 PrefService* pref_service, |
| 74 net::URLRequestContextGetter* request_context_getter, | 75 net::URLRequestContextGetter* request_context_getter, |
| 75 media::VideoPlaneController* video_plane_controller); | 76 media::VideoPlaneController* video_plane_controller, |
| 77 CastWindowManager* cast_window_manager); |
| 76 | 78 |
| 77 #if !defined(OS_ANDROID) | 79 #if !defined(OS_ANDROID) |
| 78 // Gets object for enforcing video resolution policy restrictions. | 80 // Gets object for enforcing video resolution policy restrictions. |
| 79 virtual media::VideoResolutionPolicy* GetVideoResolutionPolicy(); | 81 virtual media::VideoResolutionPolicy* GetVideoResolutionPolicy(); |
| 80 | 82 |
| 81 // Returns the task runner that must be used for media IO. | 83 // Returns the task runner that must be used for media IO. |
| 82 scoped_refptr<base::SingleThreadTaskRunner> GetMediaTaskRunner(); | 84 scoped_refptr<base::SingleThreadTaskRunner> GetMediaTaskRunner(); |
| 83 | 85 |
| 84 // Creates a MediaPipelineDevice (CMA backend) for media playback, called | 86 // Creates a MediaPipelineDevice (CMA backend) for media playback, called |
| 85 // once per media player instance. | 87 // once per media player instance. |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 204 CastBrowserMainParts* cast_browser_main_parts_; | 206 CastBrowserMainParts* cast_browser_main_parts_; |
| 205 std::unique_ptr<URLRequestContextFactory> url_request_context_factory_; | 207 std::unique_ptr<URLRequestContextFactory> url_request_context_factory_; |
| 206 | 208 |
| 207 DISALLOW_COPY_AND_ASSIGN(CastContentBrowserClient); | 209 DISALLOW_COPY_AND_ASSIGN(CastContentBrowserClient); |
| 208 }; | 210 }; |
| 209 | 211 |
| 210 } // namespace shell | 212 } // namespace shell |
| 211 } // namespace chromecast | 213 } // namespace chromecast |
| 212 | 214 |
| 213 #endif // CHROMECAST_BROWSER_CAST_CONTENT_BROWSER_CLIENT_H_ | 215 #endif // CHROMECAST_BROWSER_CAST_CONTENT_BROWSER_CLIENT_H_ |
| OLD | NEW |