| 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 <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 // Creates and returns the CastService instance for the current process. | 60 // Creates and returns the CastService instance for the current process. |
| 61 // Note: |request_context_getter| might be different than the main request | 61 // Note: |request_context_getter| might be different than the main request |
| 62 // getter accessible via CastBrowserProcess. | 62 // getter accessible via CastBrowserProcess. |
| 63 virtual scoped_ptr<CastService> CreateCastService( | 63 virtual scoped_ptr<CastService> CreateCastService( |
| 64 content::BrowserContext* browser_context, | 64 content::BrowserContext* browser_context, |
| 65 PrefService* pref_service, | 65 PrefService* pref_service, |
| 66 net::URLRequestContextGetter* request_context_getter, | 66 net::URLRequestContextGetter* request_context_getter, |
| 67 media::VideoPlaneController* video_plane_controller); | 67 media::VideoPlaneController* video_plane_controller); |
| 68 | 68 |
| 69 #if !defined(OS_ANDROID) | 69 #if !defined(OS_ANDROID) |
| 70 // Returns the task runner that must be used for media IO. |
| 71 scoped_refptr<base::SingleThreadTaskRunner> GetMediaTaskRunner(); |
| 72 |
| 70 // Creates a MediaPipelineDevice (CMA backend) for media playback, called | 73 // Creates a MediaPipelineDevice (CMA backend) for media playback, called |
| 71 // once per media player instance. | 74 // once per media player instance. |
| 72 virtual scoped_ptr<media::MediaPipelineBackend> CreateMediaPipelineBackend( | 75 virtual scoped_ptr<media::MediaPipelineBackend> CreateMediaPipelineBackend( |
| 73 const media::MediaPipelineDeviceParams& params); | 76 const media::MediaPipelineDeviceParams& params); |
| 74 | 77 |
| 75 media::MediaResourceTracker* media_resource_tracker(); | 78 media::MediaResourceTracker* media_resource_tracker(); |
| 76 #endif | 79 #endif |
| 77 | 80 |
| 78 // Invoked when the metrics client ID changes. | 81 // Invoked when the metrics client ID changes. |
| 79 virtual void SetMetricsClientId(const std::string& client_id); | 82 virtual void SetMetricsClientId(const std::string& client_id); |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 std::vector<std::string>* additional_schemes) override; | 157 std::vector<std::string>* additional_schemes) override; |
| 155 #if defined(OS_ANDROID) && defined(VIDEO_HOLE) | 158 #if defined(OS_ANDROID) && defined(VIDEO_HOLE) |
| 156 content::ExternalVideoSurfaceContainer* | 159 content::ExternalVideoSurfaceContainer* |
| 157 OverrideCreateExternalVideoSurfaceContainer( | 160 OverrideCreateExternalVideoSurfaceContainer( |
| 158 content::WebContents* web_contents) override; | 161 content::WebContents* web_contents) override; |
| 159 #endif // defined(OS_ANDROID) && defined(VIDEO_HOLE) | 162 #endif // defined(OS_ANDROID) && defined(VIDEO_HOLE) |
| 160 | 163 |
| 161 protected: | 164 protected: |
| 162 CastContentBrowserClient(); | 165 CastContentBrowserClient(); |
| 163 | 166 |
| 164 // Returns the task runner that must be used for media IO. | |
| 165 scoped_refptr<base::SingleThreadTaskRunner> GetMediaTaskRunner(); | |
| 166 | |
| 167 URLRequestContextFactory* url_request_context_factory() const { | 167 URLRequestContextFactory* url_request_context_factory() const { |
| 168 return url_request_context_factory_.get(); | 168 return url_request_context_factory_.get(); |
| 169 } | 169 } |
| 170 | 170 |
| 171 private: | 171 private: |
| 172 void AddNetworkHintsMessageFilter(int render_process_id, | 172 void AddNetworkHintsMessageFilter(int render_process_id, |
| 173 net::URLRequestContext* context); | 173 net::URLRequestContext* context); |
| 174 | 174 |
| 175 net::X509Certificate* SelectClientCertificateOnIOThread( | 175 net::X509Certificate* SelectClientCertificateOnIOThread( |
| 176 GURL requesting_url, | 176 GURL requesting_url, |
| (...skipping 15 matching lines...) Expand all Loading... |
| 192 CastBrowserMainParts* cast_browser_main_parts_; | 192 CastBrowserMainParts* cast_browser_main_parts_; |
| 193 scoped_ptr<URLRequestContextFactory> url_request_context_factory_; | 193 scoped_ptr<URLRequestContextFactory> url_request_context_factory_; |
| 194 | 194 |
| 195 DISALLOW_COPY_AND_ASSIGN(CastContentBrowserClient); | 195 DISALLOW_COPY_AND_ASSIGN(CastContentBrowserClient); |
| 196 }; | 196 }; |
| 197 | 197 |
| 198 } // namespace shell | 198 } // namespace shell |
| 199 } // namespace chromecast | 199 } // namespace chromecast |
| 200 | 200 |
| 201 #endif // CHROMECAST_BROWSER_CAST_CONTENT_BROWSER_CLIENT_H_ | 201 #endif // CHROMECAST_BROWSER_CAST_CONTENT_BROWSER_CLIENT_H_ |
| OLD | NEW |