1 // Copyright (c) 2013 Intel Corporation. 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.
5 #ifndef XWALK_RUNTIME_APP_XWALK_MAIN_DELEGATE_H_
6 #define XWALK_RUNTIME_APP_XWALK_MAIN_DELEGATE_H_
10 #include "base/compiler_specific.h"
11 #include "base/memory/scoped_ptr.h"
12 #include "content/public/app/content_main_delegate.h"
13 #include "xwalk/runtime/common/xwalk_content_client.h"
19 class XWalkMainDelegate : public content::ContentMainDelegate {
22 virtual ~XWalkMainDelegate();
24 // ContentMainDelegate implementation:
25 virtual bool BasicStartupComplete(int* exit_code) OVERRIDE;
26 virtual void PreSandboxStartup() OVERRIDE;
27 virtual int RunProcess(const std::string& process_type,
28 const content::MainFunctionParams& main_function_params) OVERRIDE;
29 #if defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX)
30 virtual void ZygoteStarting(
31 ScopedVector<content::ZygoteForkDelegate>* delegates) OVERRIDE;
33 virtual content::ContentBrowserClient* CreateContentBrowserClient() OVERRIDE;
34 virtual content::ContentRendererClient*
35 CreateContentRendererClient() OVERRIDE;
37 static void InitializeResourceBundle();
40 scoped_ptr<XWalkRunner> xwalk_runner_;
41 scoped_ptr<content::ContentRendererClient> renderer_client_;
42 scoped_ptr<content::ContentClient> content_client_;
44 DISALLOW_COPY_AND_ASSIGN(XWalkMainDelegate);
49 #endif // XWALK_RUNTIME_APP_XWALK_MAIN_DELEGATE_H_