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

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

Issue 1799413002: ServiceWorker: Release a reference when it fails to dispatch ExtendableMessageEvent (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move_dispatch_extendable_message_event
Patch Set: fix build failures Created 4 years, 9 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 // 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
61 // 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
62 // until later ReleaseMessages is called for this port (this will happen 62 // until later ReleaseMessages is called for this port (this will happen
63 // automatically as soon as a WebMessagePortChannelImpl instance is created 63 // automatically as soon as a WebMessagePortChannelImpl instance is created
64 // 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
65 // 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
66 // 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
67 // clean up the port. 67 // clean up the port.
68 void HoldMessages(int message_port_id); 68 void HoldMessages(int message_port_id);
69 69
70 // Returns true if messages for a message port are on hold.
71 bool AreMessagesHeld(int message_port_id);
72
70 // Closes and cleans up the message port. 73 // Closes and cleans up the message port.
71 void ClosePort(int message_port_id); 74 void ClosePort(int message_port_id);
72 75
73 void OnMessagePortDelegateClosing(MessagePortDelegate* filter); 76 void OnMessagePortDelegateClosing(MessagePortDelegate* filter);
74 77
75 // Attempts to send the queued messages for a message port. 78 // Attempts to send the queued messages for a message port.
76 void SendQueuedMessagesIfPossible(int message_port_id); 79 void SendQueuedMessagesIfPossible(int message_port_id);
77 80
78 private: 81 private:
79 friend struct base::DefaultSingletonTraits<MessagePortService>; 82 friend struct base::DefaultSingletonTraits<MessagePortService>;
(...skipping 16 matching lines...) Expand all
96 99
97 // We need globally unique identifiers for each message port. 100 // We need globally unique identifiers for each message port.
98 int next_message_port_id_; 101 int next_message_port_id_;
99 102
100 DISALLOW_COPY_AND_ASSIGN(MessagePortService); 103 DISALLOW_COPY_AND_ASSIGN(MessagePortService);
101 }; 104 };
102 105
103 } // namespace content 106 } // namespace content
104 107
105 #endif // CONTENT_BROWSER_MESSAGE_PORT_SERVICE_H_ 108 #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