OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-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_PROXY_H__ | 5 #ifndef CHROME_COMMON_IPC_CHANNEL_PROXY_H__ |
6 #define CHROME_COMMON_IPC_CHANNEL_PROXY_H__ | 6 #define CHROME_COMMON_IPC_CHANNEL_PROXY_H__ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 #include "base/lock.h" | 9 #include "base/lock.h" |
10 #include "base/ref_counted.h" | 10 #include "base/ref_counted.h" |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 | 57 |
58 // Called on the background thread when the filter has been removed from | 58 // Called on the background thread when the filter has been removed from |
59 // the ChannelProxy and when the Channel is closing. After a filter is | 59 // the ChannelProxy and when the Channel is closing. After a filter is |
60 // removed, it will not be called again. | 60 // removed, it will not be called again. |
61 virtual void OnFilterRemoved() {} | 61 virtual void OnFilterRemoved() {} |
62 | 62 |
63 // Called to inform the filter that the IPC channel is connected and we | 63 // Called to inform the filter that the IPC channel is connected and we |
64 // have received the internal Hello message from the peer. | 64 // have received the internal Hello message from the peer. |
65 virtual void OnChannelConnected(int32 peer_pid) {} | 65 virtual void OnChannelConnected(int32 peer_pid) {} |
66 | 66 |
| 67 // Called when there is an error on the channel, typically that the channel |
| 68 // has been closed. |
| 69 virtual void OnChannelError() {} |
| 70 |
67 // Called to inform the filter that the IPC channel will be destroyed. | 71 // Called to inform the filter that the IPC channel will be destroyed. |
68 // OnFilterRemoved is called immediately after this. | 72 // OnFilterRemoved is called immediately after this. |
69 virtual void OnChannelClosing() {} | 73 virtual void OnChannelClosing() {} |
70 | 74 |
71 // Return true to indicate that the message was handled, or false to let | 75 // Return true to indicate that the message was handled, or false to let |
72 // the message be handled in the default way. | 76 // the message be handled in the default way. |
73 virtual bool OnMessageReceived(const Message& message) { | 77 virtual bool OnMessageReceived(const Message& message) { |
74 return false; | 78 return false; |
75 } | 79 } |
76 }; | 80 }; |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 | 201 |
198 // By maintaining this indirection (ref-counted) to our internal state, we | 202 // By maintaining this indirection (ref-counted) to our internal state, we |
199 // can safely be destroyed while the background thread continues to do stuff | 203 // can safely be destroyed while the background thread continues to do stuff |
200 // that involves this data. | 204 // that involves this data. |
201 scoped_refptr<Context> context_; | 205 scoped_refptr<Context> context_; |
202 }; | 206 }; |
203 | 207 |
204 } // namespace IPC | 208 } // namespace IPC |
205 | 209 |
206 #endif // CHROME_COMMON_IPC_CHANNEL_PROXY_H__ | 210 #endif // CHROME_COMMON_IPC_CHANNEL_PROXY_H__ |
OLD | NEW |