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