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 25 matching lines...) Expand all Loading... |
36 namespace chromecast { | 36 namespace chromecast { |
37 class CastService; | 37 class CastService; |
38 | 38 |
39 namespace media { | 39 namespace media { |
40 class MediaCapsImpl; | 40 class MediaCapsImpl; |
41 class MediaPipelineBackend; | 41 class MediaPipelineBackend; |
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 } | 47 } |
47 | 48 |
48 namespace shell { | 49 namespace shell { |
49 | 50 |
50 class CastBrowserMainParts; | 51 class CastBrowserMainParts; |
51 class URLRequestContextFactory; | 52 class URLRequestContextFactory; |
52 | 53 |
53 class CastContentBrowserClient : public content::ContentBrowserClient { | 54 class CastContentBrowserClient : public content::ContentBrowserClient { |
54 public: | 55 public: |
55 // Creates an implementation of CastContentBrowserClient. Platform should | 56 // Creates an implementation of CastContentBrowserClient. Platform should |
(...skipping 11 matching lines...) Expand all Loading... |
67 // Creates and returns the CastService instance for the current process. | 68 // Creates and returns the CastService instance for the current process. |
68 // Note: |request_context_getter| might be different than the main request | 69 // Note: |request_context_getter| might be different than the main request |
69 // getter accessible via CastBrowserProcess. | 70 // getter accessible via CastBrowserProcess. |
70 virtual std::unique_ptr<CastService> CreateCastService( | 71 virtual std::unique_ptr<CastService> CreateCastService( |
71 content::BrowserContext* browser_context, | 72 content::BrowserContext* browser_context, |
72 PrefService* pref_service, | 73 PrefService* pref_service, |
73 net::URLRequestContextGetter* request_context_getter, | 74 net::URLRequestContextGetter* request_context_getter, |
74 media::VideoPlaneController* video_plane_controller); | 75 media::VideoPlaneController* video_plane_controller); |
75 | 76 |
76 #if !defined(OS_ANDROID) | 77 #if !defined(OS_ANDROID) |
| 78 // Gets object for enforcing video resolution policy restrictions. |
| 79 virtual media::VideoResolutionPolicy* GetVideoResolutionPolicy(); |
| 80 |
77 // Returns the task runner that must be used for media IO. | 81 // Returns the task runner that must be used for media IO. |
78 scoped_refptr<base::SingleThreadTaskRunner> GetMediaTaskRunner(); | 82 scoped_refptr<base::SingleThreadTaskRunner> GetMediaTaskRunner(); |
79 | 83 |
80 // Creates a MediaPipelineDevice (CMA backend) for media playback, called | 84 // Creates a MediaPipelineDevice (CMA backend) for media playback, called |
81 // once per media player instance. | 85 // once per media player instance. |
82 virtual std::unique_ptr<media::MediaPipelineBackend> | 86 virtual std::unique_ptr<media::MediaPipelineBackend> |
83 CreateMediaPipelineBackend(const media::MediaPipelineDeviceParams& params, | 87 CreateMediaPipelineBackend(const media::MediaPipelineDeviceParams& params, |
84 const std::string& audio_device_id); | 88 const std::string& audio_device_id); |
85 | 89 |
86 media::MediaResourceTracker* media_resource_tracker(); | 90 media::MediaResourceTracker* media_resource_tracker(); |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 CastBrowserMainParts* cast_browser_main_parts_; | 207 CastBrowserMainParts* cast_browser_main_parts_; |
204 std::unique_ptr<URLRequestContextFactory> url_request_context_factory_; | 208 std::unique_ptr<URLRequestContextFactory> url_request_context_factory_; |
205 | 209 |
206 DISALLOW_COPY_AND_ASSIGN(CastContentBrowserClient); | 210 DISALLOW_COPY_AND_ASSIGN(CastContentBrowserClient); |
207 }; | 211 }; |
208 | 212 |
209 } // namespace shell | 213 } // namespace shell |
210 } // namespace chromecast | 214 } // namespace chromecast |
211 | 215 |
212 #endif // CHROMECAST_BROWSER_CAST_CONTENT_BROWSER_CLIENT_H_ | 216 #endif // CHROMECAST_BROWSER_CAST_CONTENT_BROWSER_CLIENT_H_ |
OLD | NEW |