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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 static bool IsNamedServerInitialized(const std::string& channel_id); | 45 static bool IsNamedServerInitialized(const std::string& channel_id); |
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 | 56 |
56 static const base::string16 PipeName(const std::string& channel_id, | 57 static const base::string16 PipeName(const std::string& channel_id, |
57 int32* secret); | 58 int32* secret); |
58 bool CreatePipe(const IPC::ChannelHandle &channel_handle, Mode mode); | 59 bool CreatePipe(const IPC::ChannelHandle &channel_handle, Mode mode); |
59 | 60 |
60 bool ProcessConnection(); | 61 bool ProcessConnection(); |
61 bool ProcessOutgoingMessages(base::MessageLoopForIO::IOContext* context, | 62 bool ProcessOutgoingMessages(base::MessageLoopForIO::IOContext* context, |
62 DWORD bytes_written); | 63 DWORD bytes_written); |
63 | 64 |
64 // Returns |false| on channel error. | 65 // Returns |false| on channel error. |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 // |broker_| must outlive this instance. | 133 // |broker_| must outlive this instance. |
133 AttachmentBroker* broker_; | 134 AttachmentBroker* broker_; |
134 | 135 |
135 base::WeakPtrFactory<ChannelWin> weak_factory_; | 136 base::WeakPtrFactory<ChannelWin> weak_factory_; |
136 DISALLOW_COPY_AND_ASSIGN(ChannelWin); | 137 DISALLOW_COPY_AND_ASSIGN(ChannelWin); |
137 }; | 138 }; |
138 | 139 |
139 } // namespace IPC | 140 } // namespace IPC |
140 | 141 |
141 #endif // IPC_IPC_CHANNEL_WIN_H_ | 142 #endif // IPC_IPC_CHANNEL_WIN_H_ |
OLD | NEW |