| 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/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 media { | 14 namespace media { |
| 15 class AudioManagerFactory; | 15 class AudioManagerFactory; |
| 16 } | 16 } |
| 17 | 17 |
| 18 namespace net { |
| 19 class NetLog; |
| 20 } |
| 21 |
| 18 namespace chromecast { | 22 namespace chromecast { |
| 19 namespace shell { | 23 namespace shell { |
| 20 class CastBrowserProcess; | 24 class CastBrowserProcess; |
| 21 class URLRequestContextFactory; | 25 class URLRequestContextFactory; |
| 22 | 26 |
| 23 class CastBrowserMainParts : public content::BrowserMainParts { | 27 class CastBrowserMainParts : public content::BrowserMainParts { |
| 24 public: | 28 public: |
| 25 // This class does not take ownership of |url_request_content_factory|. | 29 // This class does not take ownership of |url_request_content_factory|. |
| 26 CastBrowserMainParts( | 30 CastBrowserMainParts( |
| 27 const content::MainFunctionParams& parameters, | 31 const content::MainFunctionParams& parameters, |
| 28 URLRequestContextFactory* url_request_context_factory, | 32 URLRequestContextFactory* url_request_context_factory, |
| 29 scoped_ptr<::media::AudioManagerFactory> audio_manager_factory); | 33 scoped_ptr<::media::AudioManagerFactory> audio_manager_factory); |
| 30 ~CastBrowserMainParts() override; | 34 ~CastBrowserMainParts() override; |
| 31 | 35 |
| 32 // content::BrowserMainParts implementation: | 36 // content::BrowserMainParts implementation: |
| 33 void PreMainMessageLoopStart() override; | 37 void PreMainMessageLoopStart() override; |
| 34 void PostMainMessageLoopStart() override; | 38 void PostMainMessageLoopStart() override; |
| 35 int PreCreateThreads() override; | 39 int PreCreateThreads() override; |
| 36 void PreMainMessageLoopRun() override; | 40 void PreMainMessageLoopRun() override; |
| 37 bool MainMessageLoopRun(int* result_code) override; | 41 bool MainMessageLoopRun(int* result_code) override; |
| 38 void PostMainMessageLoopRun() override; | 42 void PostMainMessageLoopRun() override; |
| 39 | 43 |
| 40 private: | 44 private: |
| 41 scoped_ptr<CastBrowserProcess> cast_browser_process_; | 45 scoped_ptr<CastBrowserProcess> cast_browser_process_; |
| 42 const content::MainFunctionParams parameters_; // For running browser tests. | 46 const content::MainFunctionParams parameters_; // For running browser tests. |
| 43 URLRequestContextFactory* const url_request_context_factory_; | 47 URLRequestContextFactory* const url_request_context_factory_; |
| 44 scoped_ptr<::media::AudioManagerFactory> audio_manager_factory_; | 48 scoped_ptr<::media::AudioManagerFactory> audio_manager_factory_; |
| 49 scoped_ptr<net::NetLog> net_log_; |
| 45 | 50 |
| 46 DISALLOW_COPY_AND_ASSIGN(CastBrowserMainParts); | 51 DISALLOW_COPY_AND_ASSIGN(CastBrowserMainParts); |
| 47 }; | 52 }; |
| 48 | 53 |
| 49 } // namespace shell | 54 } // namespace shell |
| 50 } // namespace chromecast | 55 } // namespace chromecast |
| 51 | 56 |
| 52 #endif // CHROMECAST_BROWSER_CAST_BROWSER_MAIN_PARTS_H_ | 57 #endif // CHROMECAST_BROWSER_CAST_BROWSER_MAIN_PARTS_H_ |
| OLD | NEW |