| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_SRC_CROSSCALL_PARAMS_H__ | 5 #ifndef SANDBOX_SRC_CROSSCALL_PARAMS_H__ |
| 6 #define SANDBOX_SRC_CROSSCALL_PARAMS_H__ | 6 #define SANDBOX_SRC_CROSSCALL_PARAMS_H__ |
| 7 | 7 |
| 8 #include <windows.h> | 8 #include <windows.h> |
| 9 #include <lmaccess.h> | 9 #include <lmaccess.h> |
| 10 | 10 |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 // Tells the CrossCall object if it contains InOut parameters. | 137 // Tells the CrossCall object if it contains InOut parameters. |
| 138 void SetIsInOut(bool value) { | 138 void SetIsInOut(bool value) { |
| 139 if (value) | 139 if (value) |
| 140 is_in_out_ = 1; | 140 is_in_out_ = 1; |
| 141 else | 141 else |
| 142 is_in_out_ = 0; | 142 is_in_out_ = 0; |
| 143 } | 143 } |
| 144 | 144 |
| 145 protected: | 145 protected: |
| 146 // constructs the IPC call params. Called only from the derived classes | 146 // constructs the IPC call params. Called only from the derived classes |
| 147 explicit CrossCallParams(uint32 tag, size_t params_count) | 147 CrossCallParams(uint32 tag, size_t params_count) |
| 148 : tag_(tag), | 148 : tag_(tag), |
| 149 params_count_(params_count), | 149 params_count_(params_count), |
| 150 is_in_out_(0) { | 150 is_in_out_(0) { |
| 151 } | 151 } |
| 152 | 152 |
| 153 private: | 153 private: |
| 154 uint32 tag_; | 154 uint32 tag_; |
| 155 uint32 is_in_out_; | 155 uint32 is_in_out_; |
| 156 CrossCallReturn call_return; | 156 CrossCallReturn call_return; |
| 157 const size_t params_count_; | 157 const size_t params_count_; |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 286 DISALLOW_COPY_AND_ASSIGN(ActualCallParams); | 286 DISALLOW_COPY_AND_ASSIGN(ActualCallParams); |
| 287 }; | 287 }; |
| 288 | 288 |
| 289 COMPILE_ASSERT(sizeof(ActualCallParams<1, 1024>) == 1024, bad_size_buffer); | 289 COMPILE_ASSERT(sizeof(ActualCallParams<1, 1024>) == 1024, bad_size_buffer); |
| 290 COMPILE_ASSERT(sizeof(ActualCallParams<2, 1024>) == 1024, bad_size_buffer); | 290 COMPILE_ASSERT(sizeof(ActualCallParams<2, 1024>) == 1024, bad_size_buffer); |
| 291 COMPILE_ASSERT(sizeof(ActualCallParams<3, 1024>) == 1024, bad_size_buffer); | 291 COMPILE_ASSERT(sizeof(ActualCallParams<3, 1024>) == 1024, bad_size_buffer); |
| 292 | 292 |
| 293 } // namespace sandbox | 293 } // namespace sandbox |
| 294 | 294 |
| 295 #endif // SANDBOX_SRC_CROSSCALL_PARAMS_H__ | 295 #endif // SANDBOX_SRC_CROSSCALL_PARAMS_H__ |
| OLD | NEW |