OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CONTENT_SHELL_APP_SHELL_MAIN_DELEGATE_H_ | 5 #ifndef CONTENT_SHELL_APP_SHELL_MAIN_DELEGATE_H_ |
6 #define CONTENT_SHELL_APP_SHELL_MAIN_DELEGATE_H_ | 6 #define CONTENT_SHELL_APP_SHELL_MAIN_DELEGATE_H_ |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "content/public/app/content_main_delegate.h" | 10 #include "content/public/app/content_main_delegate.h" |
11 #include "content/shell/common/shell_content_client.h" | 11 #include "content/shell/common/shell_content_client.h" |
12 | 12 |
13 namespace content { | 13 namespace content { |
14 class ShellContentBrowserClient; | 14 class ShellContentBrowserClient; |
15 class ShellContentRendererClient; | 15 class ShellContentRendererClient; |
| 16 class ShellContentUtilityClient; |
16 | 17 |
17 #if defined(OS_ANDROID) | 18 #if defined(OS_ANDROID) |
18 class BrowserMainRunner; | 19 class BrowserMainRunner; |
19 #endif | 20 #endif |
20 | 21 |
21 class ShellMainDelegate : public ContentMainDelegate { | 22 class ShellMainDelegate : public ContentMainDelegate { |
22 public: | 23 public: |
23 ShellMainDelegate(); | 24 ShellMainDelegate(); |
24 ~ShellMainDelegate() override; | 25 ~ShellMainDelegate() override; |
25 | 26 |
26 // ContentMainDelegate implementation: | 27 // ContentMainDelegate implementation: |
27 bool BasicStartupComplete(int* exit_code) override; | 28 bool BasicStartupComplete(int* exit_code) override; |
28 void PreSandboxStartup() override; | 29 void PreSandboxStartup() override; |
29 int RunProcess(const std::string& process_type, | 30 int RunProcess(const std::string& process_type, |
30 const MainFunctionParams& main_function_params) override; | 31 const MainFunctionParams& main_function_params) override; |
31 #if defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX) | 32 #if defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX) |
32 void ZygoteForked() override; | 33 void ZygoteForked() override; |
33 #endif | 34 #endif |
34 ContentBrowserClient* CreateContentBrowserClient() override; | 35 ContentBrowserClient* CreateContentBrowserClient() override; |
35 ContentRendererClient* CreateContentRendererClient() override; | 36 ContentRendererClient* CreateContentRendererClient() override; |
| 37 ContentUtilityClient* CreateContentUtilityClient() override; |
36 | 38 |
37 static void InitializeResourceBundle(); | 39 static void InitializeResourceBundle(); |
38 | 40 |
39 private: | 41 private: |
40 scoped_ptr<ShellContentBrowserClient> browser_client_; | 42 scoped_ptr<ShellContentBrowserClient> browser_client_; |
41 scoped_ptr<ShellContentRendererClient> renderer_client_; | 43 scoped_ptr<ShellContentRendererClient> renderer_client_; |
| 44 scoped_ptr<ShellContentUtilityClient> utility_client_; |
42 ShellContentClient content_client_; | 45 ShellContentClient content_client_; |
43 | 46 |
44 #if defined(OS_ANDROID) | 47 #if defined(OS_ANDROID) |
45 scoped_ptr<BrowserMainRunner> browser_runner_; | 48 scoped_ptr<BrowserMainRunner> browser_runner_; |
46 #endif | 49 #endif |
47 | 50 |
48 DISALLOW_COPY_AND_ASSIGN(ShellMainDelegate); | 51 DISALLOW_COPY_AND_ASSIGN(ShellMainDelegate); |
49 }; | 52 }; |
50 | 53 |
51 } // namespace content | 54 } // namespace content |
52 | 55 |
53 #endif // CONTENT_SHELL_APP_SHELL_MAIN_DELEGATE_H_ | 56 #endif // CONTENT_SHELL_APP_SHELL_MAIN_DELEGATE_H_ |
OLD | NEW |