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

Side by Side Diff: ipc/ipc_channel_proxy.h

Issue 3971004: Revert "Revert "Const-ify RefCountedThreadSafe::AddRef and Release."" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 10 years, 2 months 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 | « chrome_frame/metrics_service.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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 // OnFilterRemoved is called immediately after this. 80 // OnFilterRemoved is called immediately after this.
81 virtual void OnChannelClosing(); 81 virtual void OnChannelClosing();
82 82
83 // Return true to indicate that the message was handled, or false to let 83 // Return true to indicate that the message was handled, or false to let
84 // the message be handled in the default way. 84 // the message be handled in the default way.
85 virtual bool OnMessageReceived(const Message& message); 85 virtual bool OnMessageReceived(const Message& message);
86 86
87 // Called when the message filter is about to be deleted. This gives 87 // Called when the message filter is about to be deleted. This gives
88 // derived classes the option of controlling which thread they're deleted 88 // derived classes the option of controlling which thread they're deleted
89 // on etc. 89 // on etc.
90 virtual void OnDestruct(); 90 virtual void OnDestruct() const;
91 }; 91 };
92 92
93 struct MessageFilterTraits { 93 struct MessageFilterTraits {
94 static void Destruct(MessageFilter* filter) { 94 static void Destruct(const MessageFilter* filter) {
95 filter->OnDestruct(); 95 filter->OnDestruct();
96 } 96 }
97 }; 97 };
98 98
99 // Initializes a channel proxy. The channel_id and mode parameters are 99 // Initializes a channel proxy. The channel_id and mode parameters are
100 // passed directly to the underlying IPC::Channel. The listener is called on 100 // passed directly to the underlying IPC::Channel. The listener is called on
101 // the thread that creates the ChannelProxy. The filter's OnMessageReceived 101 // the thread that creates the ChannelProxy. The filter's OnMessageReceived
102 // method is called on the thread where the IPC::Channel is running. The 102 // method is called on the thread where the IPC::Channel is running. The
103 // filter may be null if the consumer is not interested in handling messages 103 // filter may be null if the consumer is not interested in handling messages
104 // on the background thread. Any message not handled by the filter will be 104 // on the background thread. Any message not handled by the filter will be
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 225
226 // By maintaining this indirection (ref-counted) to our internal state, we 226 // By maintaining this indirection (ref-counted) to our internal state, we
227 // can safely be destroyed while the background thread continues to do stuff 227 // can safely be destroyed while the background thread continues to do stuff
228 // that involves this data. 228 // that involves this data.
229 scoped_refptr<Context> context_; 229 scoped_refptr<Context> context_;
230 }; 230 };
231 231
232 } // namespace IPC 232 } // namespace IPC
233 233
234 #endif // IPC_IPC_CHANNEL_PROXY_H__ 234 #endif // IPC_IPC_CHANNEL_PROXY_H__
OLDNEW
« no previous file with comments | « chrome_frame/metrics_service.cc ('k') | ipc/ipc_channel_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698