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

Side by Side Diff: ipc/message_filter_router.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, 7 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 | « ipc/message_filter.cc ('k') | ipc/message_filter_router.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef IPC_MESSAGE_FILTER_ROUTER_H_
6 #define IPC_MESSAGE_FILTER_ROUTER_H_
7
8 #include <vector>
9
10 #include "ipc/ipc_message_start.h"
11
12 namespace IPC {
13
14 class Message;
15 class MessageFilter;
16
17 class MessageFilterRouter {
18 public:
19 typedef std::vector<MessageFilter*> MessageFilters;
20
21 MessageFilterRouter();
22 ~MessageFilterRouter();
23
24 void AddFilter(MessageFilter* filter);
25 void RemoveFilter(MessageFilter* filter);
26 bool TryFilters(const Message& message);
27 void Clear();
28
29 private:
30 // List of global and selective filters; a given filter will exist in either
31 // |message_global_filters_| OR |message_class_filters_|, but not both.
32 // Note that |message_global_filters_| will be given first offering of any
33 // given message. It's the filter implementer and installer's
34 // responsibility to ensure that a filter is either global or selective to
35 // ensure proper message filtering order.
36 MessageFilters global_filters_;
37 MessageFilters message_class_filters_[LastIPCMsgStart];
38 };
39
40 } // namespace IPC
41
42 #endif // IPC_MESSAGE_FILTER_ROUTER_H_
OLDNEW
« no previous file with comments | « ipc/message_filter.cc ('k') | ipc/message_filter_router.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698