OLD | NEW |
---|---|
1 // Copyright (c) 2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2008 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 CHROME_COMMON_IPC_CHANNEL_WIN_H_ | 5 #ifndef CHROME_COMMON_IPC_CHANNEL_WIN_H_ |
6 #define CHROME_COMMON_IPC_CHANNEL_WIN_H_ | 6 #define CHROME_COMMON_IPC_CHANNEL_WIN_H_ |
7 | 7 |
8 #include "chrome/common/ipc_channel.h" | 8 #include "chrome/common/ipc_channel.h" |
9 | 9 |
10 #include <queue> | 10 #include <queue> |
11 #include <string> | 11 #include <string> |
12 | 12 |
13 #include "base/message_loop.h" | 13 #include "base/message_loop.h" |
14 | 14 |
15 class NonThreadSafe; | |
16 | |
15 namespace IPC { | 17 namespace IPC { |
16 | 18 |
17 class Channel::ChannelImpl : public MessageLoopForIO::IOHandler { | 19 class Channel::ChannelImpl : public MessageLoopForIO::IOHandler { |
18 public: | 20 public: |
19 // Mirror methods of Channel, see ipc_channel.h for description. | 21 // Mirror methods of Channel, see ipc_channel.h for description. |
20 ChannelImpl(const std::wstring& channel_id, Mode mode, Listener* listener); | 22 ChannelImpl(const std::wstring& channel_id, Mode mode, Listener* listener); |
21 ~ChannelImpl() { Close(); } | 23 ~ChannelImpl() { Close(); } |
22 bool Connect(); | 24 bool Connect(); |
23 void Close(); | 25 void Close(); |
24 void set_listener(Listener* listener) { listener_ = listener; } | 26 void set_listener(Listener* listener) { listener_ = listener; } |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
66 // the connect operation in overlapped mode. | 68 // the connect operation in overlapped mode. |
67 bool waiting_connect_; | 69 bool waiting_connect_; |
68 | 70 |
69 // This flag is set when processing incoming messages. It is used to | 71 // This flag is set when processing incoming messages. It is used to |
70 // avoid recursing through ProcessIncomingMessages, which could cause | 72 // avoid recursing through ProcessIncomingMessages, which could cause |
71 // problems. TODO(darin): make this unnecessary | 73 // problems. TODO(darin): make this unnecessary |
72 bool processing_incoming_; | 74 bool processing_incoming_; |
73 | 75 |
74 ScopedRunnableMethodFactory<ChannelImpl> factory_; | 76 ScopedRunnableMethodFactory<ChannelImpl> factory_; |
75 | 77 |
78 scoped_ptr<NonThreadSafe> thread_check_; | |
jam
2009/01/28 03:33:58
surround by ifdef since only used in debug
| |
79 | |
76 DISALLOW_COPY_AND_ASSIGN(ChannelImpl); | 80 DISALLOW_COPY_AND_ASSIGN(ChannelImpl); |
77 }; | 81 }; |
78 | 82 |
79 } // namespace IPC | 83 } // namespace IPC |
80 | 84 |
81 #endif // CHROME_COMMON_IPC_CHANNEL_WIN_H_ | 85 #endif // CHROME_COMMON_IPC_CHANNEL_WIN_H_ |
OLD | NEW |