| 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 BASE_MEMORY_SHARED_MEMORY_H_ | 5 #ifndef BASE_MEMORY_SHARED_MEMORY_H_ |
| 6 #define BASE_MEMORY_SHARED_MEMORY_H_ | 6 #define BASE_MEMORY_SHARED_MEMORY_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 259 #if defined(OS_POSIX) && !defined(OS_NACL) && !defined(OS_ANDROID) && \ | 259 #if defined(OS_POSIX) && !defined(OS_NACL) && !defined(OS_ANDROID) && \ |
| 260 !(defined(OS_MACOSX) && !defined(OS_IOS)) | 260 !(defined(OS_MACOSX) && !defined(OS_IOS)) |
| 261 bool FilePathForMemoryName(const std::string& mem_name, FilePath* path); | 261 bool FilePathForMemoryName(const std::string& mem_name, FilePath* path); |
| 262 #endif | 262 #endif |
| 263 | 263 |
| 264 enum ShareMode { | 264 enum ShareMode { |
| 265 SHARE_READONLY, | 265 SHARE_READONLY, |
| 266 SHARE_CURRENT_MODE, | 266 SHARE_CURRENT_MODE, |
| 267 }; | 267 }; |
| 268 | 268 |
| 269 #if defined(OS_MACOSX) |
| 269 bool Share(SharedMemoryHandle* new_handle, ShareMode share_mode); | 270 bool Share(SharedMemoryHandle* new_handle, ShareMode share_mode); |
| 271 #endif |
| 270 | 272 |
| 271 bool ShareToProcessCommon(ProcessHandle process, | 273 bool ShareToProcessCommon(ProcessHandle process, |
| 272 SharedMemoryHandle* new_handle, | 274 SharedMemoryHandle* new_handle, |
| 273 bool close_self, | 275 bool close_self, |
| 274 ShareMode); | 276 ShareMode); |
| 275 | 277 |
| 276 #if defined(OS_WIN) | 278 #if defined(OS_WIN) |
| 277 // If true indicates this came from an external source so needs extra checks | 279 // If true indicates this came from an external source so needs extra checks |
| 278 // before being mapped. | 280 // before being mapped. |
| 279 bool external_section_; | 281 bool external_section_; |
| (...skipping 15 matching lines...) Expand all Loading... |
| 295 size_t mapped_size_; | 297 size_t mapped_size_; |
| 296 void* memory_; | 298 void* memory_; |
| 297 bool read_only_; | 299 bool read_only_; |
| 298 size_t requested_size_; | 300 size_t requested_size_; |
| 299 | 301 |
| 300 DISALLOW_COPY_AND_ASSIGN(SharedMemory); | 302 DISALLOW_COPY_AND_ASSIGN(SharedMemory); |
| 301 }; | 303 }; |
| 302 } // namespace base | 304 } // namespace base |
| 303 | 305 |
| 304 #endif // BASE_MEMORY_SHARED_MEMORY_H_ | 306 #endif // BASE_MEMORY_SHARED_MEMORY_H_ |
| OLD | NEW |