Fix auto-uninstall of legacy multi-install Chrome Frame.
[chromium-blink-merge.git] / content / renderer / renderer_main_platform_delegate.h
blob11ba4ae48f96b99451f757fa01df7ff965a32554
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
3 // found in the LICENSE file.
5 #ifndef CHROME_RENDERER_RENDERER_MAIN_PLATFORM_DELEGATE_H_
6 #define CHROME_RENDERER_RENDERER_MAIN_PLATFORM_DELEGATE_H_
8 #include "build/build_config.h"
10 #if defined(OS_WIN)
11 #include <windows.h>
12 #endif
14 #include "base/basictypes.h"
15 #include "content/common/content_export.h"
16 #include "content/public/common/main_function_params.h"
18 #ifdef __OBJC__
19 @class NSBundle;
20 #else
21 class NSBundle;
22 #endif // __OBJC__
24 namespace content {
26 class CONTENT_EXPORT RendererMainPlatformDelegate {
27 public:
28 explicit RendererMainPlatformDelegate(
29 const MainFunctionParams& parameters);
30 ~RendererMainPlatformDelegate();
32 // Called first thing and last thing in the process' lifecycle, i.e. before
33 // the sandbox is enabled.
34 void PlatformInitialize();
35 void PlatformUninitialize();
37 // Gives us an opportunity to initialize state used for tests before enabling
38 // the sandbox.
39 bool InitSandboxTests(bool no_sandbox);
41 // Initiate Lockdown, returns true on success.
42 bool EnableSandbox();
44 // Runs Sandbox tests.
45 void RunSandboxTests(bool no_sandbox);
47 private:
48 const MainFunctionParams& parameters_;
49 #if defined(OS_WIN)
50 HMODULE sandbox_test_module_;
51 #elif defined(OS_MACOSX)
52 NSBundle* sandbox_tests_bundle_;
53 #endif
55 DISALLOW_COPY_AND_ASSIGN(RendererMainPlatformDelegate);
58 } // namespace content
60 #endif // CHROME_RENDERER_RENDERER_MAIN_PLATFORM_DELEGATE_H_