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 23 matching lines...) Expand all Loading... |
34 static bool IsNamedServerInitialized(const std::string& channel_id); | 34 static bool IsNamedServerInitialized(const std::string& channel_id); |
35 base::ProcessId peer_pid() const { return peer_pid_; } | 35 base::ProcessId peer_pid() const { return peer_pid_; } |
36 | 36 |
37 private: | 37 private: |
38 // ChannelReader implementation. | 38 // ChannelReader implementation. |
39 virtual ReadState ReadData(char* buffer, | 39 virtual ReadState ReadData(char* buffer, |
40 int buffer_len, | 40 int buffer_len, |
41 int* bytes_read) OVERRIDE; | 41 int* bytes_read) OVERRIDE; |
42 virtual bool WillDispatchInputMessage(Message* msg) OVERRIDE; | 42 virtual bool WillDispatchInputMessage(Message* msg) OVERRIDE; |
43 bool DidEmptyInputBuffers() OVERRIDE; | 43 bool DidEmptyInputBuffers() OVERRIDE; |
44 virtual void HandleHelloMessage(const Message& msg) OVERRIDE; | 44 virtual void HandleInternalMessage(const Message& msg) OVERRIDE; |
45 | 45 |
46 static const string16 PipeName(const std::string& channel_id, | 46 static const string16 PipeName(const std::string& channel_id, |
47 int32* secret); | 47 int32* secret); |
48 bool CreatePipe(const IPC::ChannelHandle &channel_handle, Mode mode); | 48 bool CreatePipe(const IPC::ChannelHandle &channel_handle, Mode mode); |
49 | 49 |
50 bool ProcessConnection(); | 50 bool ProcessConnection(); |
51 bool ProcessOutgoingMessages(base::MessageLoopForIO::IOContext* context, | 51 bool ProcessOutgoingMessages(base::MessageLoopForIO::IOContext* context, |
52 DWORD bytes_written); | 52 DWORD bytes_written); |
53 | 53 |
54 // MessageLoop::IOHandler implementation. | 54 // MessageLoop::IOHandler implementation. |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 base::WeakPtrFactory<ChannelImpl> weak_factory_; | 97 base::WeakPtrFactory<ChannelImpl> weak_factory_; |
98 | 98 |
99 scoped_ptr<base::ThreadChecker> thread_check_; | 99 scoped_ptr<base::ThreadChecker> thread_check_; |
100 | 100 |
101 DISALLOW_COPY_AND_ASSIGN(ChannelImpl); | 101 DISALLOW_COPY_AND_ASSIGN(ChannelImpl); |
102 }; | 102 }; |
103 | 103 |
104 } // namespace IPC | 104 } // namespace IPC |
105 | 105 |
106 #endif // IPC_IPC_CHANNEL_WIN_H_ | 106 #endif // IPC_IPC_CHANNEL_WIN_H_ |
OLD | NEW |