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)
30 virtual content::ZygoteForkDelegate* ZygoteStarting();
32 virtual content::ContentBrowserClient* CreateContentBrowserClient() OVERRIDE;
33 virtual content::ContentRendererClient*
34 CreateContentRendererClient() OVERRIDE;
36 static void InitializeResourceBundle();
39 scoped_ptr<XWalkRunner> xwalk_runner_;
40 scoped_ptr<content::ContentRendererClient> renderer_client_;
41 scoped_ptr<content::ContentClient> content_client_;
43 DISALLOW_COPY_AND_ASSIGN(XWalkMainDelegate);
48 #endif // XWALK_RUNTIME_APP_XWALK_MAIN_DELEGATE_H_