OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 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 HEADLESS_LIB_HEADLESS_MAIN_DELEGATE_H_ |
| 6 #define HEADLESS_LIB_HEADLESS_MAIN_DELEGATE_H_ |
| 7 |
| 8 #include "base/compiler_specific.h" |
| 9 #include "base/macros.h" |
| 10 #include "base/memory/scoped_ptr.h" |
| 11 #include "content/public/app/content_main_delegate.h" |
| 12 #include "headless/headless_export.h" |
| 13 |
| 14 namespace headless { |
| 15 class HeadlessContentClient; |
| 16 class HeadlessContentBrowserClient; |
| 17 class HeadlessContentRendererClient; |
| 18 class HeadlessContentUtilityClient; |
| 19 |
| 20 class HEADLESS_EXPORT HeadlessMainDelegate |
| 21 : public content::ContentMainDelegate { |
| 22 public: |
| 23 HeadlessMainDelegate(); |
| 24 ~HeadlessMainDelegate() override; |
| 25 |
| 26 // ContentMainDelegate implementation: |
| 27 bool BasicStartupComplete(int* exit_code) override; |
| 28 void PreSandboxStartup() override; |
| 29 int RunProcess( |
| 30 const std::string& process_type, |
| 31 const content::MainFunctionParams& main_function_params) override; |
| 32 void ZygoteForked() override; |
| 33 content::ContentBrowserClient* CreateContentBrowserClient() override; |
| 34 content::ContentRendererClient* CreateContentRendererClient() override; |
| 35 content::ContentUtilityClient* CreateContentUtilityClient() override; |
| 36 |
| 37 private: |
| 38 static void InitializeResourceBundle(); |
| 39 |
| 40 scoped_ptr<HeadlessContentClient> content_client_; |
| 41 scoped_ptr<HeadlessContentBrowserClient> browser_client_; |
| 42 scoped_ptr<HeadlessContentRendererClient> renderer_client_; |
| 43 scoped_ptr<HeadlessContentUtilityClient> utility_client_; |
| 44 |
| 45 DISALLOW_COPY_AND_ASSIGN(HeadlessMainDelegate); |
| 46 }; |
| 47 |
| 48 } // namespace headless |
| 49 |
| 50 #endif // HEADLESS_LIB_HEADLESS_MAIN_DELEGATE_H_ |
OLD | NEW |