| 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_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/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| 10 #include "content/public/browser/browser_main_parts.h" | 11 #include "content/public/browser/browser_main_parts.h" |
| 11 #include "content/public/common/main_function_params.h" | 12 #include "content/public/common/main_function_params.h" |
| 12 | 13 |
| 14 namespace base { |
| 15 class SingleThreadTaskRunner; |
| 16 } // namespace base |
| 17 |
| 13 namespace net { | 18 namespace net { |
| 14 class NetLog; | 19 class NetLog; |
| 15 } | 20 } |
| 16 | 21 |
| 17 namespace chromecast { | 22 namespace chromecast { |
| 23 |
| 24 namespace media { |
| 25 class VideoPlaneController; |
| 26 } // namespace media |
| 27 |
| 18 namespace shell { | 28 namespace shell { |
| 19 class CastBrowserProcess; | 29 class CastBrowserProcess; |
| 20 class URLRequestContextFactory; | 30 class URLRequestContextFactory; |
| 21 | 31 |
| 22 class CastBrowserMainParts : public content::BrowserMainParts { | 32 class CastBrowserMainParts : public content::BrowserMainParts { |
| 23 public: | 33 public: |
| 24 // This class does not take ownership of |url_request_content_factory|. | 34 // This class does not take ownership of |url_request_content_factory|. |
| 25 CastBrowserMainParts(const content::MainFunctionParams& parameters, | 35 CastBrowserMainParts(const content::MainFunctionParams& parameters, |
| 26 URLRequestContextFactory* url_request_context_factory); | 36 URLRequestContextFactory* url_request_context_factory); |
| 27 ~CastBrowserMainParts() override; | 37 ~CastBrowserMainParts() override; |
| 28 | 38 |
| 39 scoped_refptr<base::SingleThreadTaskRunner> GetMediaTaskRunner() const; |
| 40 |
| 29 // content::BrowserMainParts implementation: | 41 // content::BrowserMainParts implementation: |
| 30 void PreMainMessageLoopStart() override; | 42 void PreMainMessageLoopStart() override; |
| 31 void PostMainMessageLoopStart() override; | 43 void PostMainMessageLoopStart() override; |
| 32 void ToolkitInitialized() override; | 44 void ToolkitInitialized() override; |
| 33 int PreCreateThreads() override; | 45 int PreCreateThreads() override; |
| 34 void PreMainMessageLoopRun() override; | 46 void PreMainMessageLoopRun() override; |
| 35 bool MainMessageLoopRun(int* result_code) override; | 47 bool MainMessageLoopRun(int* result_code) override; |
| 36 void PostMainMessageLoopRun() override; | 48 void PostMainMessageLoopRun() override; |
| 49 void PostDestroyThreads() override; |
| 37 | 50 |
| 38 private: | 51 private: |
| 39 scoped_ptr<CastBrowserProcess> cast_browser_process_; | 52 scoped_ptr<CastBrowserProcess> cast_browser_process_; |
| 40 const content::MainFunctionParams parameters_; // For running browser tests. | 53 const content::MainFunctionParams parameters_; // For running browser tests. |
| 41 URLRequestContextFactory* const url_request_context_factory_; | 54 URLRequestContextFactory* const url_request_context_factory_; |
| 42 scoped_ptr<net::NetLog> net_log_; | 55 scoped_ptr<net::NetLog> net_log_; |
| 56 scoped_ptr<media::VideoPlaneController> video_plane_controller_; |
| 43 | 57 |
| 44 DISALLOW_COPY_AND_ASSIGN(CastBrowserMainParts); | 58 DISALLOW_COPY_AND_ASSIGN(CastBrowserMainParts); |
| 45 }; | 59 }; |
| 46 | 60 |
| 47 } // namespace shell | 61 } // namespace shell |
| 48 } // namespace chromecast | 62 } // namespace chromecast |
| 49 | 63 |
| 50 #endif // CHROMECAST_BROWSER_CAST_BROWSER_MAIN_PARTS_H_ | 64 #endif // CHROMECAST_BROWSER_CAST_BROWSER_MAIN_PARTS_H_ |
| OLD | NEW |