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

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

Issue 1855633002: Revert of [chromecast] Pass media task runner to MediaPipelineBackendManager. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Created 4 years, 8 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
« no previous file with comments | « no previous file | chromecast/browser/cast_browser_main_parts.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_BROWSER_MAIN_PARTS_H_ 5 #ifndef CHROMECAST_BROWSER_CAST_BROWSER_MAIN_PARTS_H_
6 #define CHROMECAST_BROWSER_CAST_BROWSER_MAIN_PARTS_H_ 6 #define CHROMECAST_BROWSER_CAST_BROWSER_MAIN_PARTS_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
11 #include "content/public/browser/browser_main_parts.h" 11 #include "content/public/browser/browser_main_parts.h"
12 #include "content/public/common/main_function_params.h" 12 #include "content/public/common/main_function_params.h"
13 13
14 namespace base { 14 namespace base {
15 class SingleThreadTaskRunner; 15 class SingleThreadTaskRunner;
16 } // namespace base 16 } // namespace base
17 17
18 namespace net { 18 namespace net {
19 class NetLog; 19 class NetLog;
20 } 20 }
21 21
22 namespace chromecast { 22 namespace chromecast {
23 23
24 namespace media { 24 namespace media {
25 class MediaPipelineBackendManager;
26 class MediaResourceTracker; 25 class MediaResourceTracker;
27 class VideoPlaneController; 26 class VideoPlaneController;
28 } // namespace media 27 } // namespace media
29 28
30 namespace shell { 29 namespace shell {
31 class CastBrowserProcess; 30 class CastBrowserProcess;
32 class URLRequestContextFactory; 31 class URLRequestContextFactory;
33 32
34 class CastBrowserMainParts : public content::BrowserMainParts { 33 class CastBrowserMainParts : public content::BrowserMainParts {
35 public: 34 public:
36 // This class does not take ownership of |url_request_content_factory|. 35 // This class does not take ownership of |url_request_content_factory|.
37 CastBrowserMainParts(const content::MainFunctionParams& parameters, 36 CastBrowserMainParts(const content::MainFunctionParams& parameters,
38 URLRequestContextFactory* url_request_context_factory); 37 URLRequestContextFactory* url_request_context_factory);
39 ~CastBrowserMainParts() override; 38 ~CastBrowserMainParts() override;
40 39
41 scoped_refptr<base::SingleThreadTaskRunner> GetMediaTaskRunner() const; 40 scoped_refptr<base::SingleThreadTaskRunner> GetMediaTaskRunner() const;
42
43 #if !defined(OS_ANDROID) 41 #if !defined(OS_ANDROID)
44 media::MediaResourceTracker* media_resource_tracker(); 42 media::MediaResourceTracker* media_resource_tracker();
45 media::MediaPipelineBackendManager* media_pipeline_backend_manager();
46 #endif 43 #endif
47 44
48 // content::BrowserMainParts implementation: 45 // content::BrowserMainParts implementation:
49 void PreMainMessageLoopStart() override; 46 void PreMainMessageLoopStart() override;
50 void PostMainMessageLoopStart() override; 47 void PostMainMessageLoopStart() override;
51 void ToolkitInitialized() override; 48 void ToolkitInitialized() override;
52 int PreCreateThreads() override; 49 int PreCreateThreads() override;
53 void PreMainMessageLoopRun() override; 50 void PreMainMessageLoopRun() override;
54 bool MainMessageLoopRun(int* result_code) override; 51 bool MainMessageLoopRun(int* result_code) override;
55 void PostMainMessageLoopRun() override; 52 void PostMainMessageLoopRun() override;
56 void PostDestroyThreads() override; 53 void PostDestroyThreads() override;
57 54
58 private: 55 private:
59 scoped_ptr<CastBrowserProcess> cast_browser_process_; 56 scoped_ptr<CastBrowserProcess> cast_browser_process_;
60 const content::MainFunctionParams parameters_; // For running browser tests. 57 const content::MainFunctionParams parameters_; // For running browser tests.
61 URLRequestContextFactory* const url_request_context_factory_; 58 URLRequestContextFactory* const url_request_context_factory_;
62 scoped_ptr<net::NetLog> net_log_; 59 scoped_ptr<net::NetLog> net_log_;
63 scoped_ptr<media::VideoPlaneController> video_plane_controller_; 60 scoped_ptr<media::VideoPlaneController> video_plane_controller_;
64 61
65 #if !defined(OS_ANDROID) 62 #if !defined(OS_ANDROID)
66 // Tracks usage of media resource by e.g. CMA pipeline, CDM. 63 // Tracks usage of media resource by e.g. CMA pipeline, CDM.
67 media::MediaResourceTracker* media_resource_tracker_; 64 media::MediaResourceTracker* media_resource_tracker_;
68
69 // Tracks all media pipeline backends.
70 scoped_ptr<media::MediaPipelineBackendManager>
71 media_pipeline_backend_manager_;
72 #endif 65 #endif
73 66
74 DISALLOW_COPY_AND_ASSIGN(CastBrowserMainParts); 67 DISALLOW_COPY_AND_ASSIGN(CastBrowserMainParts);
75 }; 68 };
76 69
77 } // namespace shell 70 } // namespace shell
78 } // namespace chromecast 71 } // namespace chromecast
79 72
80 #endif // CHROMECAST_BROWSER_CAST_BROWSER_MAIN_PARTS_H_ 73 #endif // CHROMECAST_BROWSER_CAST_BROWSER_MAIN_PARTS_H_
OLDNEW
« no previous file with comments | « no previous file | chromecast/browser/cast_browser_main_parts.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698