| 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 SANDBOX_WIN_SRC_TARGET_PROCESS_H_ | 5 #ifndef SANDBOX_WIN_SRC_TARGET_PROCESS_H_ |
| 6 #define SANDBOX_WIN_SRC_TARGET_PROCESS_H_ | 6 #define SANDBOX_WIN_SRC_TARGET_PROCESS_H_ |
| 7 | 7 |
| 8 #include <windows.h> | 8 #include <windows.h> |
| 9 #include <stddef.h> |
| 10 #include <stdint.h> |
| 9 | 11 |
| 10 #include "base/basictypes.h" | 12 #include "base/macros.h" |
| 11 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
| 12 #include "base/win/scoped_handle.h" | 14 #include "base/win/scoped_handle.h" |
| 13 #include "base/win/scoped_process_information.h" | 15 #include "base/win/scoped_process_information.h" |
| 14 #include "sandbox/win/src/crosscall_server.h" | 16 #include "sandbox/win/src/crosscall_server.h" |
| 15 #include "sandbox/win/src/sandbox_types.h" | 17 #include "sandbox/win/src/sandbox_types.h" |
| 16 | 18 |
| 17 namespace base { | 19 namespace base { |
| 18 namespace win { | 20 namespace win { |
| 19 | 21 |
| 20 class StartupInformation; | 22 class StartupInformation; |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 const wchar_t* command_line, | 55 const wchar_t* command_line, |
| 54 bool inherit_handles, | 56 bool inherit_handles, |
| 55 const base::win::StartupInformation& startup_info, | 57 const base::win::StartupInformation& startup_info, |
| 56 base::win::ScopedProcessInformation* target_info); | 58 base::win::ScopedProcessInformation* target_info); |
| 57 | 59 |
| 58 // Destroys the target process. | 60 // Destroys the target process. |
| 59 void Terminate(); | 61 void Terminate(); |
| 60 | 62 |
| 61 // Creates the IPC objects such as the BrokerDispatcher and the | 63 // Creates the IPC objects such as the BrokerDispatcher and the |
| 62 // IPC server. The IPC server uses the services of the thread_pool. | 64 // IPC server. The IPC server uses the services of the thread_pool. |
| 63 DWORD Init(Dispatcher* ipc_dispatcher, void* policy, | 65 DWORD Init(Dispatcher* ipc_dispatcher, |
| 64 uint32 shared_IPC_size, uint32 shared_policy_size); | 66 void* policy, |
| 67 uint32_t shared_IPC_size, |
| 68 uint32_t shared_policy_size); |
| 65 | 69 |
| 66 // Returns the handle to the target process. | 70 // Returns the handle to the target process. |
| 67 HANDLE Process() const { | 71 HANDLE Process() const { |
| 68 return sandbox_process_info_.process_handle(); | 72 return sandbox_process_info_.process_handle(); |
| 69 } | 73 } |
| 70 | 74 |
| 71 // Returns the handle to the job object that the target process belongs to. | 75 // Returns the handle to the job object that the target process belongs to. |
| 72 HANDLE Job() const { | 76 HANDLE Job() const { |
| 73 return job_; | 77 return job_; |
| 74 } | 78 } |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 }; | 134 }; |
| 131 | 135 |
| 132 // Creates a mock TargetProcess used for testing interceptions. | 136 // Creates a mock TargetProcess used for testing interceptions. |
| 133 // TODO(cpu): It seems that this method is not going to be used anymore. | 137 // TODO(cpu): It seems that this method is not going to be used anymore. |
| 134 TargetProcess* MakeTestTargetProcess(HANDLE process, HMODULE base_address); | 138 TargetProcess* MakeTestTargetProcess(HANDLE process, HMODULE base_address); |
| 135 | 139 |
| 136 | 140 |
| 137 } // namespace sandbox | 141 } // namespace sandbox |
| 138 | 142 |
| 139 #endif // SANDBOX_WIN_SRC_TARGET_PROCESS_H_ | 143 #endif // SANDBOX_WIN_SRC_TARGET_PROCESS_H_ |
| OLD | NEW |