Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(540)

Side by Side Diff: ipc/ipc_channel_proxy.h

Issue 5978003: Make IPC::Channel::Listener:OnMessageReceived have a return value indicating ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ipc/ipc_channel_posix_unittest.cc ('k') | ipc/ipc_channel_proxy.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 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 #pragma once 7 #pragma once
8 8
9 #include <vector> 9 #include <vector>
10 10
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 const std::string& channel_id() const { return channel_id_; } 169 const std::string& channel_id() const { return channel_id_; }
170 170
171 // Dispatches a message on the listener thread. 171 // Dispatches a message on the listener thread.
172 void OnDispatchMessage(const Message& message); 172 void OnDispatchMessage(const Message& message);
173 173
174 protected: 174 protected:
175 friend class base::RefCountedThreadSafe<Context>; 175 friend class base::RefCountedThreadSafe<Context>;
176 virtual ~Context() { } 176 virtual ~Context() { }
177 177
178 // IPC::Channel::Listener methods: 178 // IPC::Channel::Listener methods:
179 virtual void OnMessageReceived(const Message& message); 179 virtual bool OnMessageReceived(const Message& message);
180 virtual void OnChannelConnected(int32 peer_pid); 180 virtual void OnChannelConnected(int32 peer_pid);
181 virtual void OnChannelError(); 181 virtual void OnChannelError();
182 182
183 // Like OnMessageReceived but doesn't try the filters. 183 // Like OnMessageReceived but doesn't try the filters.
184 void OnMessageReceivedNoFilter(const Message& message); 184 bool OnMessageReceivedNoFilter(const Message& message);
185 185
186 // Gives the filters a chance at processing |message|. 186 // Gives the filters a chance at processing |message|.
187 // Returns true if the message was processed, false otherwise. 187 // Returns true if the message was processed, false otherwise.
188 bool TryFilters(const Message& message); 188 bool TryFilters(const Message& message);
189 189
190 // Like Open and Close, but called on the IPC thread. 190 // Like Open and Close, but called on the IPC thread.
191 virtual void OnChannelOpened(); 191 virtual void OnChannelOpened();
192 virtual void OnChannelClosed(); 192 virtual void OnChannelClosed();
193 193
194 // Called on the consumers thread when the ChannelProxy is closed. At that 194 // Called on the consumers thread when the ChannelProxy is closed. At that
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 242
243 // By maintaining this indirection (ref-counted) to our internal state, we 243 // By maintaining this indirection (ref-counted) to our internal state, we
244 // can safely be destroyed while the background thread continues to do stuff 244 // can safely be destroyed while the background thread continues to do stuff
245 // that involves this data. 245 // that involves this data.
246 scoped_refptr<Context> context_; 246 scoped_refptr<Context> context_;
247 }; 247 };
248 248
249 } // namespace IPC 249 } // namespace IPC
250 250
251 #endif // IPC_IPC_CHANNEL_PROXY_H__ 251 #endif // IPC_IPC_CHANNEL_PROXY_H__
OLDNEW
« no previous file with comments | « ipc/ipc_channel_posix_unittest.cc ('k') | ipc/ipc_channel_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698