OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CONTENT_RENDERER_RENDERER_MAIN_PLATFORM_DELEGATE_H_ | 5 #ifndef CONTENT_RENDERER_RENDERER_MAIN_PLATFORM_DELEGATE_H_ |
6 #define CONTENT_RENDERER_RENDERER_MAIN_PLATFORM_DELEGATE_H_ | 6 #define CONTENT_RENDERER_RENDERER_MAIN_PLATFORM_DELEGATE_H_ |
7 | 7 |
8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
9 | 9 |
10 #if defined(OS_WIN) | 10 #if defined(OS_WIN) |
11 #include <windows.h> | 11 #include <windows.h> |
12 #endif | 12 #endif |
13 | 13 |
14 #include "base/macros.h" | 14 #include "base/macros.h" |
15 #include "content/common/content_export.h" | 15 #include "content/common/content_export.h" |
16 #include "content/public/common/main_function_params.h" | 16 #include "content/public/common/main_function_params.h" |
17 | 17 |
18 #ifdef __OBJC__ | |
19 @class NSBundle; | |
20 #else | |
21 class NSBundle; | |
22 #endif // __OBJC__ | |
23 | |
24 namespace content { | 18 namespace content { |
25 | 19 |
26 class CONTENT_EXPORT RendererMainPlatformDelegate { | 20 class CONTENT_EXPORT RendererMainPlatformDelegate { |
27 public: | 21 public: |
28 explicit RendererMainPlatformDelegate( | 22 explicit RendererMainPlatformDelegate( |
29 const MainFunctionParams& parameters); | 23 const MainFunctionParams& parameters); |
30 ~RendererMainPlatformDelegate(); | 24 ~RendererMainPlatformDelegate(); |
31 | 25 |
32 // Called first thing and last thing in the process' lifecycle, i.e. before | 26 // Called first thing and last thing in the process' lifecycle, i.e. before |
33 // the sandbox is enabled. | 27 // the sandbox is enabled. |
34 void PlatformInitialize(); | 28 void PlatformInitialize(); |
35 void PlatformUninitialize(); | 29 void PlatformUninitialize(); |
36 | 30 |
37 // Initiate Lockdown, returns true on success. | 31 // Initiate Lockdown, returns true on success. |
38 bool EnableSandbox(); | 32 bool EnableSandbox(); |
39 | 33 |
40 private: | 34 private: |
41 #if defined(OS_WIN) | 35 #if defined(OS_WIN) |
42 const MainFunctionParams& parameters_; | 36 const MainFunctionParams& parameters_; |
43 HMODULE sandbox_test_module_; | |
44 #elif defined(OS_MACOSX) | |
45 NSBundle* sandbox_tests_bundle_; | |
46 #endif | 37 #endif |
47 | 38 |
48 DISALLOW_COPY_AND_ASSIGN(RendererMainPlatformDelegate); | 39 DISALLOW_COPY_AND_ASSIGN(RendererMainPlatformDelegate); |
49 }; | 40 }; |
50 | 41 |
51 } // namespace content | 42 } // namespace content |
52 | 43 |
53 #endif // CONTENT_RENDERER_RENDERER_MAIN_PLATFORM_DELEGATE_H_ | 44 #endif // CONTENT_RENDERER_RENDERER_MAIN_PLATFORM_DELEGATE_H_ |
OLD | NEW |