| 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_SHELL_MAIN_DELEGATE_H_ | 5 #ifndef CONTENT_SHELL_SHELL_MAIN_DELEGATE_H_ |
| 6 #define CONTENT_SHELL_SHELL_MAIN_DELEGATE_H_ | 6 #define CONTENT_SHELL_SHELL_MAIN_DELEGATE_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| 11 #include "content/shell/shell_content_client.h" | 11 #include "content/shell/shell_content_client.h" |
| 12 #include "content/public/app/content_main_delegate.h" | 12 #include "content/public/app/content_main_delegate.h" |
| 13 | 13 |
| 14 namespace content { | 14 namespace content { |
| 15 class ShellContentBrowserClient; | 15 class ShellContentBrowserClient; |
| 16 class ShellContentRendererClient; | 16 class ShellContentRendererClient; |
| 17 class ShellContentPluginClient; | |
| 18 class ShellContentUtilityClient; | |
| 19 } // namespace content | 17 } // namespace content |
| 20 | 18 |
| 21 class ShellMainDelegate : public content::ContentMainDelegate { | 19 class ShellMainDelegate : public content::ContentMainDelegate { |
| 22 public: | 20 public: |
| 23 ShellMainDelegate(); | 21 ShellMainDelegate(); |
| 24 virtual ~ShellMainDelegate(); | 22 virtual ~ShellMainDelegate(); |
| 25 | 23 |
| 24 // content::ContentMainDelegate implementation: |
| 26 virtual bool BasicStartupComplete(int* exit_code) OVERRIDE; | 25 virtual bool BasicStartupComplete(int* exit_code) OVERRIDE; |
| 27 virtual void PreSandboxStartup() OVERRIDE; | 26 virtual void PreSandboxStartup() OVERRIDE; |
| 28 virtual int RunProcess( | 27 virtual int RunProcess( |
| 29 const std::string& process_type, | 28 const std::string& process_type, |
| 30 const content::MainFunctionParams& main_function_params) OVERRIDE; | 29 const content::MainFunctionParams& main_function_params) OVERRIDE; |
| 31 #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) | 30 virtual content::ContentBrowserClient* CreateContentBrowserClient() OVERRIDE; |
| 32 virtual void ZygoteForked() OVERRIDE; | 31 virtual content::ContentRendererClient* |
| 33 #endif | 32 CreateContentRendererClient() OVERRIDE; |
| 34 | 33 |
| 35 private: | 34 private: |
| 36 void InitializeShellContentClient(const std::string& process_type); | |
| 37 void InitializeResourceBundle(); | 35 void InitializeResourceBundle(); |
| 38 | 36 |
| 39 scoped_ptr<content::ShellContentBrowserClient> browser_client_; | 37 scoped_ptr<content::ShellContentBrowserClient> browser_client_; |
| 40 scoped_ptr<content::ShellContentRendererClient> renderer_client_; | 38 scoped_ptr<content::ShellContentRendererClient> renderer_client_; |
| 41 scoped_ptr<content::ShellContentPluginClient> plugin_client_; | |
| 42 scoped_ptr<content::ShellContentUtilityClient> utility_client_; | |
| 43 content::ShellContentClient content_client_; | 39 content::ShellContentClient content_client_; |
| 44 | 40 |
| 45 DISALLOW_COPY_AND_ASSIGN(ShellMainDelegate); | 41 DISALLOW_COPY_AND_ASSIGN(ShellMainDelegate); |
| 46 }; | 42 }; |
| 47 | 43 |
| 48 #endif // CONTENT_SHELL_SHELL_MAIN_DELEGATE_H_ | 44 #endif // CONTENT_SHELL_SHELL_MAIN_DELEGATE_H_ |
| OLD | NEW |