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

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

Issue 1113053002: Set the AudioManager factory before the browser main loop. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cleanup + naming Created 5 years, 7 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 | « chromecast/browser/DEPS ('k') | 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 media {
15 class AudioManagerFactory;
16 }
17
14 namespace chromecast { 18 namespace chromecast {
15 namespace shell { 19 namespace shell {
16 class CastBrowserProcess; 20 class CastBrowserProcess;
17 class URLRequestContextFactory; 21 class URLRequestContextFactory;
18 22
19 class CastBrowserMainParts : public content::BrowserMainParts { 23 class CastBrowserMainParts : public content::BrowserMainParts {
20 public: 24 public:
25 // This class does not take ownership of |url_request_content_factory|.
21 CastBrowserMainParts( 26 CastBrowserMainParts(
22 const content::MainFunctionParams& parameters, 27 const content::MainFunctionParams& parameters,
23 URLRequestContextFactory* url_request_context_factory); 28 URLRequestContextFactory* url_request_context_factory,
29 scoped_ptr<::media::AudioManagerFactory> audio_manager_factory);
24 ~CastBrowserMainParts() override; 30 ~CastBrowserMainParts() override;
25 31
26 // content::BrowserMainParts implementation: 32 // content::BrowserMainParts implementation:
27 void PreMainMessageLoopStart() override; 33 void PreMainMessageLoopStart() override;
28 void PostMainMessageLoopStart() override; 34 void PostMainMessageLoopStart() override;
29 int PreCreateThreads() override; 35 int PreCreateThreads() override;
30 void PreMainMessageLoopRun() override; 36 void PreMainMessageLoopRun() override;
31 bool MainMessageLoopRun(int* result_code) override; 37 bool MainMessageLoopRun(int* result_code) override;
32 void PostMainMessageLoopRun() override; 38 void PostMainMessageLoopRun() override;
33 39
34 private: 40 private:
35 scoped_ptr<CastBrowserProcess> cast_browser_process_; 41 scoped_ptr<CastBrowserProcess> cast_browser_process_;
36 const content::MainFunctionParams parameters_; // For running browser tests. 42 const content::MainFunctionParams parameters_; // For running browser tests.
37 URLRequestContextFactory* const url_request_context_factory_; 43 URLRequestContextFactory* const url_request_context_factory_;
44 scoped_ptr<::media::AudioManagerFactory> audio_manager_factory_;
38 45
39 DISALLOW_COPY_AND_ASSIGN(CastBrowserMainParts); 46 DISALLOW_COPY_AND_ASSIGN(CastBrowserMainParts);
40 }; 47 };
41 48
42 } // namespace shell 49 } // namespace shell
43 } // namespace chromecast 50 } // namespace chromecast
44 51
45 #endif // CHROMECAST_BROWSER_CAST_BROWSER_MAIN_PARTS_H_ 52 #endif // CHROMECAST_BROWSER_CAST_BROWSER_MAIN_PARTS_H_
OLDNEW
« no previous file with comments | « chromecast/browser/DEPS ('k') | chromecast/browser/cast_browser_main_parts.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698