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_APP_CAST_MAIN_DELEGATE_H_ | 5 #ifndef CHROMECAST_SHELL_APP_CAST_MAIN_DELEGATE_H_ |
6 #define CHROMECAST_SHELL_APP_CAST_MAIN_DELEGATE_H_ | 6 #define CHROMECAST_SHELL_APP_CAST_MAIN_DELEGATE_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "chromecast/shell/common/cast_content_client.h" | 10 #include "chromecast/shell/common/cast_content_client.h" |
11 #include "content/public/app/content_main_delegate.h" | 11 #include "content/public/app/content_main_delegate.h" |
12 | 12 |
| 13 namespace content { |
| 14 class BrowserMainRunner; |
| 15 } // namespace content |
| 16 |
13 namespace chromecast { | 17 namespace chromecast { |
14 | 18 |
15 class CastResourceDelegate; | 19 class CastResourceDelegate; |
16 | 20 |
17 namespace shell { | 21 namespace shell { |
18 | 22 |
19 class CastContentBrowserClient; | 23 class CastContentBrowserClient; |
20 class CastContentRendererClient; | 24 class CastContentRendererClient; |
21 | 25 |
22 class CastMainDelegate : public content::ContentMainDelegate { | 26 class CastMainDelegate : public content::ContentMainDelegate { |
23 public: | 27 public: |
24 CastMainDelegate(); | 28 CastMainDelegate(); |
25 virtual ~CastMainDelegate(); | 29 virtual ~CastMainDelegate(); |
26 | 30 |
27 // content::ContentMainDelegate implementation: | 31 // content::ContentMainDelegate implementation: |
28 virtual bool BasicStartupComplete(int* exit_code) OVERRIDE; | 32 virtual bool BasicStartupComplete(int* exit_code) OVERRIDE; |
29 virtual void PreSandboxStartup() OVERRIDE; | 33 virtual void PreSandboxStartup() OVERRIDE; |
| 34 virtual int RunProcess( |
| 35 const std::string& process_type, |
| 36 const content::MainFunctionParams& main_function_params) OVERRIDE; |
| 37 #if !defined(OS_ANDROID) |
30 virtual void ZygoteForked() OVERRIDE; | 38 virtual void ZygoteForked() OVERRIDE; |
| 39 #endif // !defined(OS_ANDROID) |
31 virtual content::ContentBrowserClient* CreateContentBrowserClient() OVERRIDE; | 40 virtual content::ContentBrowserClient* CreateContentBrowserClient() OVERRIDE; |
32 virtual content::ContentRendererClient* | 41 virtual content::ContentRendererClient* |
33 CreateContentRendererClient() OVERRIDE; | 42 CreateContentRendererClient() OVERRIDE; |
34 | 43 |
35 private: | 44 private: |
36 void InitializeResourceBundle(); | 45 void InitializeResourceBundle(); |
37 | 46 |
38 scoped_ptr<CastContentBrowserClient> browser_client_; | 47 scoped_ptr<CastContentBrowserClient> browser_client_; |
39 scoped_ptr<CastContentRendererClient> renderer_client_; | 48 scoped_ptr<CastContentRendererClient> renderer_client_; |
40 scoped_ptr<CastResourceDelegate> resource_delegate_; | 49 scoped_ptr<CastResourceDelegate> resource_delegate_; |
41 CastContentClient content_client_; | 50 CastContentClient content_client_; |
42 | 51 |
| 52 #if defined(OS_ANDROID) |
| 53 scoped_ptr<content::BrowserMainRunner> browser_runner_; |
| 54 #endif // defined(OS_ANDROID) |
| 55 |
43 DISALLOW_COPY_AND_ASSIGN(CastMainDelegate); | 56 DISALLOW_COPY_AND_ASSIGN(CastMainDelegate); |
44 }; | 57 }; |
45 | 58 |
46 } // namespace shell | 59 } // namespace shell |
47 } // namespace chromecast | 60 } // namespace chromecast |
48 | 61 |
49 #endif // CHROMECAST_SHELL_APP_CAST_MAIN_DELEGATE_H_ | 62 #endif // CHROMECAST_SHELL_APP_CAST_MAIN_DELEGATE_H_ |
OLD | NEW |