OLD | NEW |
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 IPC_HANDLE_WIN_H_ | 5 #ifndef IPC_HANDLE_WIN_H_ |
6 #define IPC_HANDLE_WIN_H_ | 6 #define IPC_HANDLE_WIN_H_ |
7 | 7 |
8 #include <windows.h> | 8 #include <windows.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
11 | 11 |
12 #include "ipc/ipc_export.h" | 12 #include "ipc/ipc_export.h" |
13 #include "ipc/ipc_param_traits.h" | 13 #include "ipc/ipc_param_traits.h" |
14 | 14 |
15 namespace base { | 15 namespace base { |
16 class Pickle; | 16 class Pickle; |
17 class PickleIterator; | 17 class PickleIterator; |
18 } // namespace base | 18 } // namespace base |
19 | 19 |
20 namespace IPC { | 20 namespace IPC { |
21 | 21 |
22 class Message; | |
23 | |
24 // HandleWin is a wrapper around a Windows HANDLE that can be transported | 22 // HandleWin is a wrapper around a Windows HANDLE that can be transported |
25 // across Chrome IPC channels that support attachment brokering. The HANDLE will | 23 // across Chrome IPC channels that support attachment brokering. The HANDLE will |
26 // be duplicated into the destination process. | 24 // be duplicated into the destination process. |
27 // | 25 // |
28 // The ownership semantics for the underlying |handle_| are complex. See | 26 // The ownership semantics for the underlying |handle_| are complex. See |
29 // ipc/mach_port_mac.h (the OSX analog of this class) for an extensive | 27 // ipc/mach_port_mac.h (the OSX analog of this class) for an extensive |
30 // discussion. | 28 // discussion. |
31 class IPC_EXPORT HandleWin { | 29 class IPC_EXPORT HandleWin { |
32 public: | 30 public: |
33 enum Permissions { | 31 enum Permissions { |
(...skipping 26 matching lines...) Expand all Loading... |
60 static void Write(base::Pickle* m, const param_type& p); | 58 static void Write(base::Pickle* m, const param_type& p); |
61 static bool Read(const base::Pickle* m, | 59 static bool Read(const base::Pickle* m, |
62 base::PickleIterator* iter, | 60 base::PickleIterator* iter, |
63 param_type* p); | 61 param_type* p); |
64 static void Log(const param_type& p, std::string* l); | 62 static void Log(const param_type& p, std::string* l); |
65 }; | 63 }; |
66 | 64 |
67 } // namespace IPC | 65 } // namespace IPC |
68 | 66 |
69 #endif // IPC_HANDLE_WIN_H_ | 67 #endif // IPC_HANDLE_WIN_H_ |
OLD | NEW |