[email protected] | 0bc2a57b | 2009-02-04 20:32:54 | [diff] [blame] | 1 | // Copyright (c) 2009 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 CHROME_RENDERER_RENDERER_PLATFORM_DELEGATE_H_ |
| 6 | #define CHROME_RENDERER_RENDERER_PLATFORM_DELEGATE_H_ |
| 7 | |
| 8 | #include "chrome/common/main_function_params.h" |
| 9 | |
| 10 | class RendererMainPlatformDelegate { |
| 11 | public: |
| 12 | RendererMainPlatformDelegate(const MainFunctionParams& parameters); |
| 13 | ~RendererMainPlatformDelegate(); |
| 14 | |
| 15 | // Called first thing and last thing in the process' lifecycle, i.e. before |
| 16 | // the sandbox is enabled. |
| 17 | void PlatformInitialize(); |
| 18 | void PlatformUninitialize(); |
| 19 | |
| 20 | // Gives us an opportunity to initialize state used for tests before enabling |
| 21 | // the sandbox. |
| 22 | bool InitSandboxTests(bool no_sandbox); |
| 23 | |
| 24 | // Initiate Lockdown, returns true on success. |
| 25 | bool EnableSandbox(); |
| 26 | |
| 27 | // Runs Sandbox tests. |
| 28 | void RunSandboxTests(); |
| 29 | |
| 30 | private: |
| 31 | const MainFunctionParams& parameters_; |
| 32 | #if defined(OS_WIN) |
| 33 | HMODULE sandbox_test_module_; |
| 34 | #endif |
| 35 | |
| 36 | DISALLOW_COPY_AND_ASSIGN(RendererMainPlatformDelegate); |
| 37 | }; |
| 38 | |
| 39 | #endif // CHROME_RENDERER_RENDERER_PLATFORM_DELEGATE_H_ |