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