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 PickleIterator; | 17 class PickleIterator; |
17 } // namespace base | 18 } // namespace base |
18 | 19 |
19 namespace IPC { | 20 namespace IPC { |
20 | 21 |
21 class Message; | 22 class Message; |
22 | 23 |
23 // HandleWin is a wrapper around a Windows HANDLE that can be transported | 24 // HandleWin is a wrapper around a Windows HANDLE that can be transported |
24 // across Chrome IPC channels that support attachment brokering. The HANDLE will | 25 // across Chrome IPC channels that support attachment brokering. The HANDLE will |
25 // be duplicated into the destination process. | 26 // be duplicated into the destination process. |
(...skipping 23 matching lines...) Expand all Loading... |
49 Permissions get_permissions() const { return permissions_; } | 50 Permissions get_permissions() const { return permissions_; } |
50 | 51 |
51 private: | 52 private: |
52 HANDLE handle_; | 53 HANDLE handle_; |
53 Permissions permissions_; | 54 Permissions permissions_; |
54 }; | 55 }; |
55 | 56 |
56 template <> | 57 template <> |
57 struct IPC_EXPORT ParamTraits<HandleWin> { | 58 struct IPC_EXPORT ParamTraits<HandleWin> { |
58 typedef HandleWin param_type; | 59 typedef HandleWin param_type; |
59 static void Write(Message* m, const param_type& p); | 60 static void Write(base::Pickle* m, const param_type& p); |
60 static bool Read(const Message* m, base::PickleIterator* iter, param_type* p); | 61 static bool Read(const base::Pickle* m, |
| 62 base::PickleIterator* iter, |
| 63 param_type* p); |
61 static void Log(const param_type& p, std::string* l); | 64 static void Log(const param_type& p, std::string* l); |
62 }; | 65 }; |
63 | 66 |
64 } // namespace IPC | 67 } // namespace IPC |
65 | 68 |
66 #endif // IPC_HANDLE_WIN_H_ | 69 #endif // IPC_HANDLE_WIN_H_ |
OLD | NEW |