OLD | NEW |
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_BROWSER_MESSAGE_PORT_MESSAGE_FILTER_H_ | 5 #ifndef CONTENT_BROWSER_MESSAGE_PORT_MESSAGE_FILTER_H_ |
6 #define CONTENT_BROWSER_MESSAGE_PORT_MESSAGE_FILTER_H_ | 6 #define CONTENT_BROWSER_MESSAGE_PORT_MESSAGE_FILTER_H_ |
7 | 7 |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "content/common/content_export.h" | 9 #include "content/common/content_export.h" |
10 #include "content/public/browser/browser_message_filter.h" | 10 #include "content/public/browser/browser_message_filter.h" |
(...skipping 22 matching lines...) Expand all Loading... |
33 | 33 |
34 // BrowserMessageFilter implementation. | 34 // BrowserMessageFilter implementation. |
35 void OnChannelClosing() override; | 35 void OnChannelClosing() override; |
36 bool OnMessageReceived(const IPC::Message& message) override; | 36 bool OnMessageReceived(const IPC::Message& message) override; |
37 void OnDestruct() const override; | 37 void OnDestruct() const override; |
38 | 38 |
39 int GetNextRoutingID(); | 39 int GetNextRoutingID(); |
40 | 40 |
41 // MessagePortDelegate implementation. | 41 // MessagePortDelegate implementation. |
42 void SendMessage(int route_id, | 42 void SendMessage(int route_id, |
43 const base::string16& message, | 43 const MessagePortMessage& message, |
44 const std::vector<int>& sent_message_port_ids) override; | 44 const std::vector<int>& sent_message_port_ids) override; |
45 void SendMessagesAreQueued(int route_id) override; | 45 void SendMessagesAreQueued(int route_id) override; |
46 | 46 |
47 // Updates message ports registered for |message_port_ids| and returns | 47 // Updates message ports registered for |message_port_ids| and returns |
48 // new routing IDs for the updated ports via |new_routing_ids|. | 48 // new routing IDs for the updated ports via |new_routing_ids|. |
49 void UpdateMessagePortsWithNewRoutes( | 49 void UpdateMessagePortsWithNewRoutes( |
50 const std::vector<int>& message_port_ids, | 50 const std::vector<int>& message_port_ids, |
51 std::vector<int>* new_routing_ids); | 51 std::vector<int>* new_routing_ids); |
52 | 52 |
53 void RouteMessageEventWithMessagePorts( | 53 void RouteMessageEventWithMessagePorts( |
(...skipping 14 matching lines...) Expand all Loading... |
68 // This is guaranteed to be valid until OnChannelClosing is invoked, and it's | 68 // This is guaranteed to be valid until OnChannelClosing is invoked, and it's |
69 // not used after. | 69 // not used after. |
70 NextRoutingIDCallback next_routing_id_; | 70 NextRoutingIDCallback next_routing_id_; |
71 | 71 |
72 DISALLOW_IMPLICIT_CONSTRUCTORS(MessagePortMessageFilter); | 72 DISALLOW_IMPLICIT_CONSTRUCTORS(MessagePortMessageFilter); |
73 }; | 73 }; |
74 | 74 |
75 } // namespace content | 75 } // namespace content |
76 | 76 |
77 #endif // CONTENT_BROWSER_WORKER_MESSAGE_FILTER_H_ | 77 #endif // CONTENT_BROWSER_WORKER_MESSAGE_FILTER_H_ |
OLD | NEW |