Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(118)

Side by Side Diff: base/memory/shared_memory_handle.h

Issue 2479683004: base: Cleanup class/struct forward declarations (Closed)
Patch Set: Add missing forward declaration Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « base/mac/bundle_locations.h ('k') | base/message_loop/incoming_task_queue.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_HANDLE_H_ 5 #ifndef BASE_MEMORY_SHARED_MEMORY_HANDLE_H_
6 #define BASE_MEMORY_SHARED_MEMORY_HANDLE_H_ 6 #define BASE_MEMORY_SHARED_MEMORY_HANDLE_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include "build/build_config.h" 10 #include "build/build_config.h"
11 11
12 #if defined(OS_WIN) 12 #if defined(OS_WIN)
13 #include <windows.h> 13 #include <windows.h>
14 #include "base/process/process_handle.h" 14 #include "base/process/process_handle.h"
15 #elif defined(OS_MACOSX) && !defined(OS_IOS) 15 #elif defined(OS_MACOSX) && !defined(OS_IOS)
16 #include <mach/mach.h> 16 #include <mach/mach.h>
17 #include "base/base_export.h" 17 #include "base/base_export.h"
18 #include "base/macros.h" 18 #include "base/macros.h"
19 #include "base/process/process_handle.h" 19 #include "base/process/process_handle.h"
20 #elif defined(OS_POSIX) 20 #elif defined(OS_POSIX)
21 #include <sys/types.h> 21 #include <sys/types.h>
22 #include "base/file_descriptor_posix.h" 22 #include "base/file_descriptor_posix.h"
23 #endif 23 #endif
24 24
25 namespace base { 25 namespace base {
26 26
27 class Pickle;
28
29 // SharedMemoryHandle is a platform specific type which represents 27 // SharedMemoryHandle is a platform specific type which represents
30 // the underlying OS handle to a shared memory segment. 28 // the underlying OS handle to a shared memory segment.
31 #if defined(OS_POSIX) && !(defined(OS_MACOSX) && !defined(OS_IOS)) 29 #if defined(OS_POSIX) && !(defined(OS_MACOSX) && !defined(OS_IOS))
32 typedef FileDescriptor SharedMemoryHandle; 30 typedef FileDescriptor SharedMemoryHandle;
33 #elif defined(OS_WIN) 31 #elif defined(OS_WIN)
34 class BASE_EXPORT SharedMemoryHandle { 32 class BASE_EXPORT SharedMemoryHandle {
35 public: 33 public:
36 // The default constructor returns an invalid SharedMemoryHandle. 34 // The default constructor returns an invalid SharedMemoryHandle.
37 SharedMemoryHandle(); 35 SharedMemoryHandle();
38 SharedMemoryHandle(HANDLE h, base::ProcessId pid); 36 SharedMemoryHandle(HANDLE h, base::ProcessId pid);
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 // ownership of |memory_object_| to the IPC stack. This is meant to mimic 153 // ownership of |memory_object_| to the IPC stack. This is meant to mimic
156 // the behavior of the |auto_close| parameter of FileDescriptor. 154 // the behavior of the |auto_close| parameter of FileDescriptor.
157 // Defaults to |false|. 155 // Defaults to |false|.
158 bool ownership_passes_to_ipc_ = false; 156 bool ownership_passes_to_ipc_ = false;
159 }; 157 };
160 #endif 158 #endif
161 159
162 } // namespace base 160 } // namespace base
163 161
164 #endif // BASE_MEMORY_SHARED_MEMORY_HANDLE_H_ 162 #endif // BASE_MEMORY_SHARED_MEMORY_HANDLE_H_
OLDNEW
« no previous file with comments | « base/mac/bundle_locations.h ('k') | base/message_loop/incoming_task_queue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698