Chromium Code Reviews| 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 #include "media/audio/audio_manager_factory.h" | |
|
derekjchow1
2015/04/30 17:33:15
Don't include. Forward declare ::media::AudioManag
slan
2015/04/30 17:52:04
Done.
| |
| 13 | 14 |
| 14 namespace chromecast { | 15 namespace chromecast { |
| 15 namespace shell { | 16 namespace shell { |
| 16 class CastBrowserProcess; | 17 class CastBrowserProcess; |
| 17 class URLRequestContextFactory; | 18 class URLRequestContextFactory; |
| 18 | 19 |
| 19 class CastBrowserMainParts : public content::BrowserMainParts { | 20 class CastBrowserMainParts : public content::BrowserMainParts { |
| 20 public: | 21 public: |
| 22 // This class does not take ownership of |url_request_content_factory|. | |
| 23 // AudioManagerFactory is a platform factory used to create AudioManagers. | |
|
gunsch
2015/04/30 17:29:36
second line unnecessary, that can be gleaned from
slan
2015/04/30 17:52:04
Done.
| |
| 21 CastBrowserMainParts( | 24 CastBrowserMainParts( |
| 22 const content::MainFunctionParams& parameters, | 25 const content::MainFunctionParams& parameters, |
| 23 URLRequestContextFactory* url_request_context_factory); | 26 URLRequestContextFactory* url_request_context_factory, |
| 27 scoped_ptr<::media::AudioManagerFactory> audio_manager_factory); | |
| 24 ~CastBrowserMainParts() override; | 28 ~CastBrowserMainParts() override; |
| 25 | 29 |
| 26 // content::BrowserMainParts implementation: | 30 // content::BrowserMainParts implementation: |
| 27 void PreMainMessageLoopStart() override; | 31 void PreMainMessageLoopStart() override; |
| 28 void PostMainMessageLoopStart() override; | 32 void PostMainMessageLoopStart() override; |
| 29 int PreCreateThreads() override; | 33 int PreCreateThreads() override; |
| 30 void PreMainMessageLoopRun() override; | 34 void PreMainMessageLoopRun() override; |
| 31 bool MainMessageLoopRun(int* result_code) override; | 35 bool MainMessageLoopRun(int* result_code) override; |
| 32 void PostMainMessageLoopRun() override; | 36 void PostMainMessageLoopRun() override; |
| 33 | 37 |
| 34 private: | 38 private: |
| 35 scoped_ptr<CastBrowserProcess> cast_browser_process_; | 39 scoped_ptr<CastBrowserProcess> cast_browser_process_; |
| 36 const content::MainFunctionParams parameters_; // For running browser tests. | 40 const content::MainFunctionParams parameters_; // For running browser tests. |
| 37 URLRequestContextFactory* const url_request_context_factory_; | 41 URLRequestContextFactory* const url_request_context_factory_; |
| 42 scoped_ptr<::media::AudioManagerFactory> audio_manager_factory_; | |
| 38 | 43 |
| 39 DISALLOW_COPY_AND_ASSIGN(CastBrowserMainParts); | 44 DISALLOW_COPY_AND_ASSIGN(CastBrowserMainParts); |
| 40 }; | 45 }; |
| 41 | 46 |
| 42 } // namespace shell | 47 } // namespace shell |
| 43 } // namespace chromecast | 48 } // namespace chromecast |
| 44 | 49 |
| 45 #endif // CHROMECAST_BROWSER_CAST_BROWSER_MAIN_PARTS_H_ | 50 #endif // CHROMECAST_BROWSER_CAST_BROWSER_MAIN_PARTS_H_ |
| OLD | NEW |