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

Side by Side Diff: content/browser/message_port_service.h

Issue 1110103003: Initial implementation of stashed message ports, content side (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nicer dchecks Created 5 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
« no previous file with comments | « no previous file | content/browser/message_port_service.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_BROWSER_MESSAGE_PORT_SERVICE_H_ 5 #ifndef CONTENT_BROWSER_MESSAGE_PORT_SERVICE_H_
6 #define CONTENT_BROWSER_MESSAGE_PORT_SERVICE_H_ 6 #define CONTENT_BROWSER_MESSAGE_PORT_SERVICE_H_
7 7
8 #include <map> 8 #include <map>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 void SendQueuedMessages(int message_port_id, 42 void SendQueuedMessages(int message_port_id,
43 const QueuedMessages& queued_messages); 43 const QueuedMessages& queued_messages);
44 void ReleaseMessages(int message_port_id); 44 void ReleaseMessages(int message_port_id);
45 45
46 // Updates the information needed to reach a message port when it's sent to a 46 // Updates the information needed to reach a message port when it's sent to a
47 // (possibly different) process. 47 // (possibly different) process.
48 void UpdateMessagePort(int message_port_id, 48 void UpdateMessagePort(int message_port_id,
49 MessagePortDelegate* delegate, 49 MessagePortDelegate* delegate,
50 int routing_id); 50 int routing_id);
51 51
52 // Returns the current information by which a message port can be reached.
53 // Either |delegate| or |routing_id| can be null, in which case that bit of
54 // information is not returned.
55 void GetMessagePortInfo(int message_port_id,
56 MessagePortDelegate** delegate,
57 int* routing_id);
58
52 // The message port is being transferred to a new renderer process, but the 59 // The message port is being transferred to a new renderer process, but the
53 // code doing that isn't able to immediately update the message port with a 60 // code doing that isn't able to immediately update the message port with a
54 // new filter and routing_id. This queues up all messages sent to this port 61 // new filter and routing_id. This queues up all messages sent to this port
55 // until later ReleaseMessages is called for this port (this will happen 62 // until later ReleaseMessages is called for this port (this will happen
56 // automatically as soon as a WebMessagePortChannelImpl instance is created 63 // automatically as soon as a WebMessagePortChannelImpl instance is created
57 // for this port in the renderer. The browser side code is still responsible 64 // for this port in the renderer. The browser side code is still responsible
58 // for updating the port with a new filter before that happens. If ultimately 65 // for updating the port with a new filter before that happens. If ultimately
59 // transfering the port to a new process fails, ClosePort should be called to 66 // transfering the port to a new process fails, ClosePort should be called to
60 // clean up the port. 67 // clean up the port.
61 void HoldMessages(int message_port_id); 68 void HoldMessages(int message_port_id);
(...skipping 27 matching lines...) Expand all
89 96
90 // We need globally unique identifiers for each message port. 97 // We need globally unique identifiers for each message port.
91 int next_message_port_id_; 98 int next_message_port_id_;
92 99
93 DISALLOW_COPY_AND_ASSIGN(MessagePortService); 100 DISALLOW_COPY_AND_ASSIGN(MessagePortService);
94 }; 101 };
95 102
96 } // namespace content 103 } // namespace content
97 104
98 #endif // CONTENT_BROWSER_MESSAGE_PORT_SERVICE_H_ 105 #endif // CONTENT_BROWSER_MESSAGE_PORT_SERVICE_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/message_port_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698