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_SHELL_BROWSER_CAST_BROWSER_MAIN_PARTS_H_ | 5 #ifndef CHROMECAST_SHELL_BROWSER_CAST_BROWSER_MAIN_PARTS_H_ |
6 #define CHROMECAST_SHELL_BROWSER_CAST_BROWSER_MAIN_PARTS_H_ | 6 #define CHROMECAST_SHELL_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 | 12 #include "content/public/common/main_function_params.h" |
13 namespace content { | |
14 struct MainFunctionParams; | |
15 } | |
16 | 13 |
17 namespace chromecast { | 14 namespace chromecast { |
18 namespace shell { | 15 namespace shell { |
19 class CastBrowserProcess; | 16 class CastBrowserProcess; |
20 class URLRequestContextFactory; | 17 class URLRequestContextFactory; |
21 | 18 |
22 class CastBrowserMainParts : public content::BrowserMainParts { | 19 class CastBrowserMainParts : public content::BrowserMainParts { |
23 public: | 20 public: |
24 CastBrowserMainParts( | 21 CastBrowserMainParts( |
25 const content::MainFunctionParams& parameters, | 22 const content::MainFunctionParams& parameters, |
26 URLRequestContextFactory* url_request_context_factory); | 23 URLRequestContextFactory* url_request_context_factory); |
27 virtual ~CastBrowserMainParts(); | 24 virtual ~CastBrowserMainParts(); |
28 | 25 |
29 // content::BrowserMainParts implementation: | 26 // content::BrowserMainParts implementation: |
30 virtual void PreMainMessageLoopStart() OVERRIDE; | 27 virtual void PreMainMessageLoopStart() OVERRIDE; |
31 virtual void PostMainMessageLoopStart() OVERRIDE; | 28 virtual void PostMainMessageLoopStart() OVERRIDE; |
32 virtual int PreCreateThreads() OVERRIDE; | 29 virtual int PreCreateThreads() OVERRIDE; |
33 virtual void PreMainMessageLoopRun() OVERRIDE; | 30 virtual void PreMainMessageLoopRun() OVERRIDE; |
34 virtual bool MainMessageLoopRun(int* result_code) OVERRIDE; | 31 virtual bool MainMessageLoopRun(int* result_code) OVERRIDE; |
35 virtual void PostMainMessageLoopRun() OVERRIDE; | 32 virtual void PostMainMessageLoopRun() OVERRIDE; |
36 | 33 |
37 private: | 34 private: |
38 scoped_ptr<CastBrowserProcess> cast_browser_process_; | 35 scoped_ptr<CastBrowserProcess> cast_browser_process_; |
39 | 36 |
37 // For running browser tests. | |
38 const content::MainFunctionParams parameters_; | |
lcwu1
2014/09/08 19:49:15
The way the data members are broken up and where y
gunsch
2014/09/08 21:34:45
Done.
| |
40 URLRequestContextFactory* const url_request_context_factory_; | 39 URLRequestContextFactory* const url_request_context_factory_; |
41 | 40 |
42 DISALLOW_COPY_AND_ASSIGN(CastBrowserMainParts); | 41 DISALLOW_COPY_AND_ASSIGN(CastBrowserMainParts); |
43 }; | 42 }; |
44 | 43 |
45 } // namespace shell | 44 } // namespace shell |
46 } // namespace chromecast | 45 } // namespace chromecast |
47 | 46 |
48 #endif // CHROMECAST_SHELL_BROWSER_CAST_BROWSER_MAIN_PARTS_H_ | 47 #endif // CHROMECAST_SHELL_BROWSER_CAST_BROWSER_MAIN_PARTS_H_ |
OLD | NEW |