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

Side by Side Diff: content/child/child_message_filter.h

Issue 245443005: Move IPC::MessageFilter and router to a separate file (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix gn build Created 6 years, 8 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 | « content/child/child_histogram_message_filter.cc ('k') | content/child/child_message_filter.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 CONTENT_CHILD_CROSS_MESSAGE_FILTER_H_ 5 #ifndef CONTENT_CHILD_CROSS_MESSAGE_FILTER_H_
6 #define CONTENT_CHILD_CROSS_MESSAGE_FILTER_H_ 6 #define CONTENT_CHILD_CROSS_MESSAGE_FILTER_H_
7 7
8 #include "ipc/ipc_channel_proxy.h" 8 #include "base/memory/ref_counted.h"
9 #include "ipc/ipc_sender.h"
9 10
10 namespace base { 11 namespace base {
11 class TaskRunner; 12 class TaskRunner;
12 } 13 }
13 14
15 namespace IPC {
16 class MessageFilter;
17 }
18
14 namespace content { 19 namespace content {
15 20
16 class ThreadSafeSender; 21 class ThreadSafeSender;
17 22
18 // A base class for implementing IPC MessageFilter's that run on a different 23 // A base class for implementing IPC MessageFilter's that run on a different
19 // thread or TaskRunner than the main thread. 24 // thread or TaskRunner than the main thread.
20 class ChildMessageFilter 25 class ChildMessageFilter
21 : public base::RefCountedThreadSafe<ChildMessageFilter>, 26 : public base::RefCountedThreadSafe<ChildMessageFilter>,
22 public IPC::Sender { 27 public IPC::Sender {
23 public: 28 public:
(...skipping 21 matching lines...) Expand all
45 virtual ~ChildMessageFilter(); 50 virtual ~ChildMessageFilter();
46 51
47 private: 52 private:
48 class Internal; 53 class Internal;
49 friend class ChildThread; 54 friend class ChildThread;
50 friend class RenderThreadImpl; 55 friend class RenderThreadImpl;
51 friend class WorkerThread; 56 friend class WorkerThread;
52 57
53 friend class base::RefCountedThreadSafe<ChildMessageFilter>; 58 friend class base::RefCountedThreadSafe<ChildMessageFilter>;
54 59
55 IPC::ChannelProxy::MessageFilter* GetFilter(); 60 IPC::MessageFilter* GetFilter();
56 61
57 // This implements IPC::ChannelProxy::MessageFilter to hide the actual 62 // This implements IPC::MessageFilter to hide the actual filter methods from
58 // filter methods from child classes. 63 // child classes.
59 Internal* internal_; 64 Internal* internal_;
60 65
61 scoped_refptr<ThreadSafeSender> thread_safe_sender_; 66 scoped_refptr<ThreadSafeSender> thread_safe_sender_;
62 67
63 DISALLOW_COPY_AND_ASSIGN(ChildMessageFilter); 68 DISALLOW_COPY_AND_ASSIGN(ChildMessageFilter);
64 }; 69 };
65 70
66 } // namespace content 71 } // namespace content
67 72
68 #endif // CONTENT_CHILD_CROSS_MESSAGE_FILTER_H_ 73 #endif // CONTENT_CHILD_CROSS_MESSAGE_FILTER_H_
OLDNEW
« no previous file with comments | « content/child/child_histogram_message_filter.cc ('k') | content/child/child_message_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698