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 15 matching lines...) Expand all Loading... |
26 } | 26 } |
27 | 27 |
28 namespace metrics { | 28 namespace metrics { |
29 class MetricsService; | 29 class MetricsService; |
30 } | 30 } |
31 | 31 |
32 namespace chromecast { | 32 namespace chromecast { |
33 namespace media { | 33 namespace media { |
34 class MediaPipelineBackend; | 34 class MediaPipelineBackend; |
35 struct MediaPipelineDeviceParams; | 35 struct MediaPipelineDeviceParams; |
| 36 class CmaMediaPipelineClient; |
36 } | 37 } |
37 | 38 |
38 namespace shell { | 39 namespace shell { |
39 | 40 |
40 class CastBrowserMainParts; | 41 class CastBrowserMainParts; |
41 class URLRequestContextFactory; | 42 class URLRequestContextFactory; |
42 | 43 |
43 class CastContentBrowserClient : public content::ContentBrowserClient { | 44 class CastContentBrowserClient : public content::ContentBrowserClient { |
44 public: | 45 public: |
45 // Creates an implementation of CastContentBrowserClient. Platform should | 46 // Creates an implementation of CastContentBrowserClient. Platform should |
46 // link in an implementation as needed. | 47 // link in an implementation as needed. |
47 static scoped_ptr<CastContentBrowserClient> Create(); | 48 static scoped_ptr<CastContentBrowserClient> Create(); |
48 | 49 |
49 ~CastContentBrowserClient() override; | 50 ~CastContentBrowserClient() override; |
50 | 51 |
51 // Appends extra command line arguments before launching a new process. | 52 // Appends extra command line arguments before launching a new process. |
52 virtual void AppendExtraCommandLineSwitches(base::CommandLine* command_line); | 53 virtual void AppendExtraCommandLineSwitches(base::CommandLine* command_line); |
53 | 54 |
54 // Returns any BrowserMessageFilters that should be added when launching a | 55 // Returns any BrowserMessageFilters that should be added when launching a |
55 // new render process. | 56 // new render process. |
56 virtual std::vector<scoped_refptr<content::BrowserMessageFilter>> | 57 virtual std::vector<scoped_refptr<content::BrowserMessageFilter>> |
57 GetBrowserMessageFilters(); | 58 GetBrowserMessageFilters(); |
58 | 59 |
59 // Provide an AudioManagerFactory instance for WebAudio playback. | 60 // Provide an AudioManagerFactory instance for WebAudio playback. |
60 virtual scoped_ptr<::media::AudioManagerFactory> CreateAudioManagerFactory(); | 61 virtual scoped_ptr<::media::AudioManagerFactory> CreateAudioManagerFactory(); |
61 | 62 |
62 #if !defined(OS_ANDROID) | 63 #if !defined(OS_ANDROID) |
63 // Creates a MediaPipelineDevice (CMA backend) for media playback, called | 64 // Creates a CmaMediaPipelineClient which is responsible to create (CMA |
64 // once per media player instance. | 65 // backend) |
65 virtual scoped_ptr<media::MediaPipelineBackend> CreateMediaPipelineBackend( | 66 // for media playback and watch media pipeline status, called once per media |
66 const media::MediaPipelineDeviceParams& params); | 67 // player |
| 68 // instance. |
| 69 virtual scoped_refptr<media::CmaMediaPipelineClient> |
| 70 CreateCmaMediaPipelineClient(); |
67 #endif | 71 #endif |
68 | 72 |
69 // Performs cleanup for process exit (but before AtExitManager cleanup). | 73 // Performs cleanup for process exit (but before AtExitManager cleanup). |
70 void ProcessExiting(); | 74 void ProcessExiting(); |
71 | 75 |
72 // Invoked when the metrics client ID changes. | 76 // Invoked when the metrics client ID changes. |
73 virtual void SetMetricsClientId(const std::string& client_id); | 77 virtual void SetMetricsClientId(const std::string& client_id); |
74 | 78 |
75 // Allows registration of extra metrics providers. | 79 // Allows registration of extra metrics providers. |
76 virtual void RegisterMetricsProviders( | 80 virtual void RegisterMetricsProviders( |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 | 175 |
172 scoped_ptr<URLRequestContextFactory> url_request_context_factory_; | 176 scoped_ptr<URLRequestContextFactory> url_request_context_factory_; |
173 | 177 |
174 DISALLOW_COPY_AND_ASSIGN(CastContentBrowserClient); | 178 DISALLOW_COPY_AND_ASSIGN(CastContentBrowserClient); |
175 }; | 179 }; |
176 | 180 |
177 } // namespace shell | 181 } // namespace shell |
178 } // namespace chromecast | 182 } // namespace chromecast |
179 | 183 |
180 #endif // CHROMECAST_BROWSER_CAST_CONTENT_BROWSER_CLIENT_H_ | 184 #endif // CHROMECAST_BROWSER_CAST_CONTENT_BROWSER_CLIENT_H_ |
OLD | NEW |