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 IPC_IPC_CHANNEL_WIN_H_ | 5 #ifndef IPC_IPC_CHANNEL_WIN_H_ |
6 #define IPC_IPC_CHANNEL_WIN_H_ | 6 #define IPC_IPC_CHANNEL_WIN_H_ |
7 | 7 |
8 #include "ipc/ipc_channel.h" | 8 #include "ipc/ipc_channel.h" |
9 | 9 |
10 #include <stdint.h> | 10 #include <stdint.h> |
(...skipping 14 matching lines...) Expand all Loading... |
25 namespace IPC { | 25 namespace IPC { |
26 | 26 |
27 class ChannelWin : public Channel, | 27 class ChannelWin : public Channel, |
28 public internal::ChannelReader, | 28 public internal::ChannelReader, |
29 public base::MessageLoopForIO::IOHandler { | 29 public base::MessageLoopForIO::IOHandler { |
30 public: | 30 public: |
31 // Mirror methods of Channel, see ipc_channel.h for description. | 31 // Mirror methods of Channel, see ipc_channel.h for description. |
32 // |broker| must outlive the newly created object. | 32 // |broker| must outlive the newly created object. |
33 ChannelWin(const IPC::ChannelHandle& channel_handle, | 33 ChannelWin(const IPC::ChannelHandle& channel_handle, |
34 Mode mode, | 34 Mode mode, |
35 Listener* listener, | 35 Listener* listener); |
36 AttachmentBroker* broker); | |
37 ~ChannelWin() override; | 36 ~ChannelWin() override; |
38 | 37 |
39 // Channel implementation | 38 // Channel implementation |
40 bool Connect() override; | 39 bool Connect() override; |
41 void Close() override; | 40 void Close() override; |
42 bool Send(Message* message) override; | 41 bool Send(Message* message) override; |
43 AttachmentBroker* GetAttachmentBroker() override; | 42 AttachmentBroker* GetAttachmentBroker() override; |
44 base::ProcessId GetPeerPID() const override; | 43 base::ProcessId GetPeerPID() const override; |
45 base::ProcessId GetSelfPID() const override; | 44 base::ProcessId GetSelfPID() const override; |
46 | 45 |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 uint32_t debug_flags_; | 125 uint32_t debug_flags_; |
127 | 126 |
128 // This is a unique per-channel value used to authenticate the client end of | 127 // This is a unique per-channel value used to authenticate the client end of |
129 // a connection. If the value is non-zero, the client passes it in the hello | 128 // a connection. If the value is non-zero, the client passes it in the hello |
130 // and the host validates. (We don't send the zero value fto preserve IPC | 129 // and the host validates. (We don't send the zero value fto preserve IPC |
131 // compatability with existing clients that don't validate the channel.) | 130 // compatability with existing clients that don't validate the channel.) |
132 int32_t client_secret_; | 131 int32_t client_secret_; |
133 | 132 |
134 scoped_ptr<base::ThreadChecker> thread_check_; | 133 scoped_ptr<base::ThreadChecker> thread_check_; |
135 | 134 |
136 // |broker_| must outlive this instance. | |
137 AttachmentBroker* broker_; | |
138 | |
139 base::WeakPtrFactory<ChannelWin> weak_factory_; | 135 base::WeakPtrFactory<ChannelWin> weak_factory_; |
140 DISALLOW_COPY_AND_ASSIGN(ChannelWin); | 136 DISALLOW_COPY_AND_ASSIGN(ChannelWin); |
141 }; | 137 }; |
142 | 138 |
143 } // namespace IPC | 139 } // namespace IPC |
144 | 140 |
145 #endif // IPC_IPC_CHANNEL_WIN_H_ | 141 #endif // IPC_IPC_CHANNEL_WIN_H_ |
OLD | NEW |