| 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 | 46 |
| 47 | 47 |
| 48 private: | 48 private: |
| 49 // ChannelReader implementation. | 49 // ChannelReader implementation. |
| 50 ReadState ReadData(char* buffer, int buffer_len, int* bytes_read) override; | 50 ReadState ReadData(char* buffer, int buffer_len, int* bytes_read) override; |
| 51 bool ShouldDispatchInputMessage(Message* msg) override; | 51 bool ShouldDispatchInputMessage(Message* msg) override; |
| 52 bool GetNonBrokeredAttachments(Message* msg) override; | 52 bool GetNonBrokeredAttachments(Message* msg) override; |
| 53 bool DidEmptyInputBuffers() override; | 53 bool DidEmptyInputBuffers() override; |
| 54 void HandleInternalMessage(const Message& msg) override; | 54 void HandleInternalMessage(const Message& msg) override; |
| 55 base::ProcessId GetSenderPID() override; | 55 base::ProcessId GetSenderPID() override; |
| 56 bool IsAttachmentBrokerEndpoint() override; |
| 56 | 57 |
| 57 static const base::string16 PipeName(const std::string& channel_id, | 58 static const base::string16 PipeName(const std::string& channel_id, |
| 58 int32* secret); | 59 int32* secret); |
| 59 bool CreatePipe(const IPC::ChannelHandle &channel_handle, Mode mode); | 60 bool CreatePipe(const IPC::ChannelHandle &channel_handle, Mode mode); |
| 60 | 61 |
| 61 bool ProcessConnection(); | 62 bool ProcessConnection(); |
| 62 bool ProcessOutgoingMessages(base::MessageLoopForIO::IOContext* context, | 63 bool ProcessOutgoingMessages(base::MessageLoopForIO::IOContext* context, |
| 63 DWORD bytes_written); | 64 DWORD bytes_written); |
| 64 | 65 |
| 65 // Returns |false| on channel error. | 66 // Returns |false| on channel error. |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 // |broker_| must outlive this instance. | 134 // |broker_| must outlive this instance. |
| 134 AttachmentBroker* broker_; | 135 AttachmentBroker* broker_; |
| 135 | 136 |
| 136 base::WeakPtrFactory<ChannelWin> weak_factory_; | 137 base::WeakPtrFactory<ChannelWin> weak_factory_; |
| 137 DISALLOW_COPY_AND_ASSIGN(ChannelWin); | 138 DISALLOW_COPY_AND_ASSIGN(ChannelWin); |
| 138 }; | 139 }; |
| 139 | 140 |
| 140 } // namespace IPC | 141 } // namespace IPC |
| 141 | 142 |
| 142 #endif // IPC_IPC_CHANNEL_WIN_H_ | 143 #endif // IPC_IPC_CHANNEL_WIN_H_ |
| OLD | NEW |