[email protected] | 81f30ce | 2012-01-18 22:10:33 | [diff] [blame] | 1 | // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
[email protected] | c1f87b2 | 2011-10-05 21:59:33 | [diff] [blame] | 2 | // Use of this source code is governed by a BSD-style license that can be |
3 | // found in the LICENSE file. | ||||
4 | |||||
5 | #ifndef CONTENT_SHELL_SHELL_MAIN_DELEGATE_H_ | ||||
6 | #define CONTENT_SHELL_SHELL_MAIN_DELEGATE_H_ | ||||
[email protected] | c1f87b2 | 2011-10-05 21:59:33 | [diff] [blame] | 7 | |
8 | #include "base/compiler_specific.h" | ||||
9 | #include "base/memory/scoped_ptr.h" | ||||
[email protected] | c1f87b2 | 2011-10-05 21:59:33 | [diff] [blame] | 10 | #include "content/shell/shell_content_client.h" |
[email protected] | 16320ea | 2011-10-20 19:57:05 | [diff] [blame] | 11 | #include "content/public/app/content_main_delegate.h" |
[email protected] | c1f87b2 | 2011-10-05 21:59:33 | [diff] [blame] | 12 | |
13 | namespace content { | ||||
14 | class ShellContentBrowserClient; | ||||
15 | class ShellContentRendererClient; | ||||
[email protected] | e5df69d4 | 2012-06-08 00:44:14 | [diff] [blame] | 16 | |
17 | #if defined(OS_ANDROID) | ||||
18 | class BrowserMainRunner; | ||||
19 | #endif | ||||
[email protected] | c1f87b2 | 2011-10-05 21:59:33 | [diff] [blame] | 20 | |
[email protected] | bdcf915 | 2012-07-19 17:43:21 | [diff] [blame] | 21 | class ShellMainDelegate : public ContentMainDelegate { |
[email protected] | c1f87b2 | 2011-10-05 21:59:33 | [diff] [blame] | 22 | public: |
23 | ShellMainDelegate(); | ||||
24 | virtual ~ShellMainDelegate(); | ||||
25 | |||||
[email protected] | bdcf915 | 2012-07-19 17:43:21 | [diff] [blame] | 26 | // ContentMainDelegate implementation: |
[email protected] | 16320ea | 2011-10-20 19:57:05 | [diff] [blame] | 27 | virtual bool BasicStartupComplete(int* exit_code) OVERRIDE; |
[email protected] | c1f87b2 | 2011-10-05 21:59:33 | [diff] [blame] | 28 | virtual void PreSandboxStartup() OVERRIDE; |
[email protected] | 16320ea | 2011-10-20 19:57:05 | [diff] [blame] | 29 | virtual int RunProcess( |
30 | const std::string& process_type, | ||||
[email protected] | bdcf915 | 2012-07-19 17:43:21 | [diff] [blame] | 31 | const MainFunctionParams& main_function_params) OVERRIDE; |
32 | virtual ContentBrowserClient* CreateContentBrowserClient() OVERRIDE; | ||||
33 | virtual ContentRendererClient* CreateContentRendererClient() OVERRIDE; | ||||
[email protected] | c1f87b2 | 2011-10-05 21:59:33 | [diff] [blame] | 34 | |
[email protected] | ca7e803a | 2012-07-25 23:01:10 | [diff] [blame] | 35 | static void InitializeResourceBundle(); |
[email protected] | c1f87b2 | 2011-10-05 21:59:33 | [diff] [blame] | 36 | |
[email protected] | ca7e803a | 2012-07-25 23:01:10 | [diff] [blame] | 37 | private: |
[email protected] | bdcf915 | 2012-07-19 17:43:21 | [diff] [blame] | 38 | scoped_ptr<ShellContentBrowserClient> browser_client_; |
39 | scoped_ptr<ShellContentRendererClient> renderer_client_; | ||||
40 | ShellContentClient content_client_; | ||||
[email protected] | c1f87b2 | 2011-10-05 21:59:33 | [diff] [blame] | 41 | |
[email protected] | e5df69d4 | 2012-06-08 00:44:14 | [diff] [blame] | 42 | #if defined(OS_ANDROID) |
[email protected] | bdcf915 | 2012-07-19 17:43:21 | [diff] [blame] | 43 | scoped_ptr<BrowserMainRunner> browser_runner_; |
[email protected] | e5df69d4 | 2012-06-08 00:44:14 | [diff] [blame] | 44 | #endif |
45 | |||||
[email protected] | c1f87b2 | 2011-10-05 21:59:33 | [diff] [blame] | 46 | DISALLOW_COPY_AND_ASSIGN(ShellMainDelegate); |
47 | }; | ||||
48 | |||||
[email protected] | bdcf915 | 2012-07-19 17:43:21 | [diff] [blame] | 49 | } // namespace content |
50 | |||||
[email protected] | f063fb0 | 2011-10-05 22:11:35 | [diff] [blame] | 51 | #endif // CONTENT_SHELL_SHELL_MAIN_DELEGATE_H_ |