| 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_PROXY_H_ | 5 #ifndef IPC_IPC_CHANNEL_PROXY_H_ |
| 6 #define IPC_IPC_CHANNEL_PROXY_H_ | 6 #define IPC_IPC_CHANNEL_PROXY_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 180 return ipc_task_runner_.get(); | 180 return ipc_task_runner_.get(); |
| 181 } | 181 } |
| 182 const std::string& channel_id() const { return channel_id_; } | 182 const std::string& channel_id() const { return channel_id_; } |
| 183 | 183 |
| 184 // Dispatches a message on the listener thread. | 184 // Dispatches a message on the listener thread. |
| 185 void OnDispatchMessage(const Message& message); | 185 void OnDispatchMessage(const Message& message); |
| 186 | 186 |
| 187 // Sends |message| from appropriate thread. | 187 // Sends |message| from appropriate thread. |
| 188 void Send(Message* message); | 188 void Send(Message* message); |
| 189 | 189 |
| 190 // Indicates if the underlying channel's Send is thread-safe. |
| 191 bool IsChannelSendThreadSafe() const; |
| 192 |
| 190 protected: | 193 protected: |
| 191 friend class base::RefCountedThreadSafe<Context>; | 194 friend class base::RefCountedThreadSafe<Context>; |
| 192 ~Context() override; | 195 ~Context() override; |
| 193 | 196 |
| 194 // IPC::Listener methods: | 197 // IPC::Listener methods: |
| 195 bool OnMessageReceived(const Message& message) override; | 198 bool OnMessageReceived(const Message& message) override; |
| 196 void OnChannelConnected(int32 peer_pid) override; | 199 void OnChannelConnected(int32 peer_pid) override; |
| 197 void OnChannelError() override; | 200 void OnChannelError() override; |
| 198 | 201 |
| 199 // Like OnMessageReceived but doesn't try the filters. | 202 // Like OnMessageReceived but doesn't try the filters. |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 298 bool did_init_; | 301 bool did_init_; |
| 299 | 302 |
| 300 #if defined(ENABLE_IPC_FUZZER) | 303 #if defined(ENABLE_IPC_FUZZER) |
| 301 OutgoingMessageFilter* outgoing_message_filter_; | 304 OutgoingMessageFilter* outgoing_message_filter_; |
| 302 #endif | 305 #endif |
| 303 }; | 306 }; |
| 304 | 307 |
| 305 } // namespace IPC | 308 } // namespace IPC |
| 306 | 309 |
| 307 #endif // IPC_IPC_CHANNEL_PROXY_H_ | 310 #endif // IPC_IPC_CHANNEL_PROXY_H_ |
| OLD | NEW |