Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(13)

Side by Side Diff: chromecast/browser/cast_content_browser_client.h

Issue 1824723003: [chromecast] Pass media task runner to VideoPlaneController. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: fixed android build Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 14 matching lines...) Expand all
25 } 25 }
26 26
27 namespace metrics { 27 namespace metrics {
28 class MetricsService; 28 class MetricsService;
29 } 29 }
30 30
31 namespace chromecast { 31 namespace chromecast {
32 class CastService; 32 class CastService;
33 33
34 namespace media { 34 namespace media {
35 class MediaPipelineBackend;
36 struct MediaPipelineDeviceParams;
37 class CmaMediaPipelineClient; 35 class CmaMediaPipelineClient;
36 class VideoPlaneController;
38 } 37 }
39 38
40 namespace shell { 39 namespace shell {
41 40
42 class CastBrowserMainParts; 41 class CastBrowserMainParts;
43 class URLRequestContextFactory; 42 class URLRequestContextFactory;
44 43
45 class CastContentBrowserClient : public content::ContentBrowserClient { 44 class CastContentBrowserClient : public content::ContentBrowserClient {
46 public: 45 public:
47 // Creates an implementation of CastContentBrowserClient. Platform should 46 // Creates an implementation of CastContentBrowserClient. Platform should
48 // link in an implementation as needed. 47 // link in an implementation as needed.
49 static scoped_ptr<CastContentBrowserClient> Create(); 48 static scoped_ptr<CastContentBrowserClient> Create();
50 49
51 ~CastContentBrowserClient() override; 50 ~CastContentBrowserClient() override;
52 51
53 // Appends extra command line arguments before launching a new process. 52 // Appends extra command line arguments before launching a new process.
54 virtual void AppendExtraCommandLineSwitches(base::CommandLine* command_line); 53 virtual void AppendExtraCommandLineSwitches(base::CommandLine* command_line);
55 54
56 // Hook for code to run before browser threads created. 55 // Hook for code to run before browser threads created.
57 virtual void PreCreateThreads(); 56 virtual void PreCreateThreads();
58 57
59 // Creates and returns the CastService instance for the current process. 58 // Creates and returns the CastService instance for the current process.
60 // Note: |request_context_getter| might be different than the main request 59 // Note: |request_context_getter| might be different than the main request
61 // getter accessible via CastBrowserProcess. 60 // getter accessible via CastBrowserProcess.
62 virtual scoped_ptr<CastService> CreateCastService( 61 virtual scoped_ptr<CastService> CreateCastService(
63 content::BrowserContext* browser_context, 62 content::BrowserContext* browser_context,
64 PrefService* pref_service, 63 PrefService* pref_service,
65 net::URLRequestContextGetter* request_context_getter); 64 net::URLRequestContextGetter* request_context_getter,
65 media::VideoPlaneController* video_plane_controller);
66 66
67 #if !defined(OS_ANDROID) 67 #if !defined(OS_ANDROID)
68 // Returns CmaMediaPipelineClient which is responsible to create 68 // Returns CmaMediaPipelineClient which is responsible to create
69 // CMA backend for media playback and watch media pipeline status. 69 // CMA backend for media playback and watch media pipeline status.
70 scoped_refptr<media::CmaMediaPipelineClient> GetCmaMediaPipelineClient(); 70 scoped_refptr<media::CmaMediaPipelineClient> GetCmaMediaPipelineClient();
71 #endif 71 #endif
72 72
73 // Performs cleanup for process exit (but before AtExitManager cleanup).
74 void ProcessExiting();
75
76 // Invoked when the metrics client ID changes. 73 // Invoked when the metrics client ID changes.
77 virtual void SetMetricsClientId(const std::string& client_id); 74 virtual void SetMetricsClientId(const std::string& client_id);
78 75
79 // Allows registration of extra metrics providers. 76 // Allows registration of extra metrics providers.
80 virtual void RegisterMetricsProviders( 77 virtual void RegisterMetricsProviders(
81 ::metrics::MetricsService* metrics_service); 78 ::metrics::MetricsService* metrics_service);
82 79
83 // Returns whether or not the remote debugging service should be started 80 // Returns whether or not the remote debugging service should be started
84 // on browser startup. 81 // on browser startup.
85 virtual bool EnableRemoteDebuggingImmediately(); 82 virtual bool EnableRemoteDebuggingImmediately();
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 #if defined(OS_ANDROID) && defined(VIDEO_HOLE) 150 #if defined(OS_ANDROID) && defined(VIDEO_HOLE)
154 content::ExternalVideoSurfaceContainer* 151 content::ExternalVideoSurfaceContainer*
155 OverrideCreateExternalVideoSurfaceContainer( 152 OverrideCreateExternalVideoSurfaceContainer(
156 content::WebContents* web_contents) override; 153 content::WebContents* web_contents) override;
157 #endif // defined(OS_ANDROID) && defined(VIDEO_HOLE) 154 #endif // defined(OS_ANDROID) && defined(VIDEO_HOLE)
158 155
159 protected: 156 protected:
160 CastContentBrowserClient(); 157 CastContentBrowserClient();
161 158
162 // Returns the task runner that must be used for media IO. 159 // Returns the task runner that must be used for media IO.
163 // TODO(alokp): We might need to make it public as we convert more callsites
164 // using MediaMessageLoop directly.
165 scoped_refptr<base::SingleThreadTaskRunner> GetMediaTaskRunner(); 160 scoped_refptr<base::SingleThreadTaskRunner> GetMediaTaskRunner();
166 161
167 #if !defined(OS_ANDROID) 162 #if !defined(OS_ANDROID)
168 virtual scoped_refptr<media::CmaMediaPipelineClient> 163 virtual scoped_refptr<media::CmaMediaPipelineClient>
169 CreateCmaMediaPipelineClient(); 164 CreateCmaMediaPipelineClient();
170 #endif // !defined(OS_ANDROID) 165 #endif // !defined(OS_ANDROID)
171 166
172 URLRequestContextFactory* url_request_context_factory() const { 167 URLRequestContextFactory* url_request_context_factory() const {
173 return url_request_context_factory_.get(); 168 return url_request_context_factory_.get();
174 } 169 }
(...skipping 14 matching lines...) Expand all
189 breakpad::CrashHandlerHostLinux* CreateCrashHandlerHost( 184 breakpad::CrashHandlerHostLinux* CreateCrashHandlerHost(
190 const std::string& process_type); 185 const std::string& process_type);
191 186
192 // A static cache to hold crash_handlers for each process_type 187 // A static cache to hold crash_handlers for each process_type
193 std::map<std::string, breakpad::CrashHandlerHostLinux*> crash_handlers_; 188 std::map<std::string, breakpad::CrashHandlerHostLinux*> crash_handlers_;
194 189
195 // The CmaMediaPipelineClient to pass to all message hosts. 190 // The CmaMediaPipelineClient to pass to all message hosts.
196 scoped_refptr<media::CmaMediaPipelineClient> cma_media_pipeline_client_; 191 scoped_refptr<media::CmaMediaPipelineClient> cma_media_pipeline_client_;
197 #endif // !defined(OS_ANDROID) 192 #endif // !defined(OS_ANDROID)
198 193
194 // Created by CastContentBrowserClient but owned by BrowserMainLoop.
195 CastBrowserMainParts* cast_browser_main_parts_;
199 scoped_ptr<URLRequestContextFactory> url_request_context_factory_; 196 scoped_ptr<URLRequestContextFactory> url_request_context_factory_;
200 197
201 DISALLOW_COPY_AND_ASSIGN(CastContentBrowserClient); 198 DISALLOW_COPY_AND_ASSIGN(CastContentBrowserClient);
202 }; 199 };
203 200
204 } // namespace shell 201 } // namespace shell
205 } // namespace chromecast 202 } // namespace chromecast
206 203
207 #endif // CHROMECAST_BROWSER_CAST_CONTENT_BROWSER_CLIENT_H_ 204 #endif // CHROMECAST_BROWSER_CAST_CONTENT_BROWSER_CLIENT_H_
OLDNEW
« no previous file with comments | « chromecast/browser/cast_browser_main_parts.cc ('k') | chromecast/browser/cast_content_browser_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698