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

Side by Side Diff: content/public/browser/message_port_provider.h

Issue 986553004: Hold messages in message port service when a message port is (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address hush nit Created 5 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 | « content/browser/message_port_provider.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 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_PUBLIC_BROWSER_MESSAGE_PORT_PROVIDER_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_MESSAGE_PORT_PROVIDER_H_
6 #define CONTENT_PUBLIC_BROWSER_MESSAGE_PORT_PROVIDER_H_ 6 #define CONTENT_PUBLIC_BROWSER_MESSAGE_PORT_PROVIDER_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 47
48 // Posts a MessageEvent to a message port associated with a message channel. 48 // Posts a MessageEvent to a message port associated with a message channel.
49 static void PostMessageToPort( 49 static void PostMessageToPort(
50 int sender_port_id, 50 int sender_port_id,
51 const MessagePortMessage& message, 51 const MessagePortMessage& message,
52 const std::vector<TransferredMessagePort>& sent_ports); 52 const std::vector<TransferredMessagePort>& sent_ports);
53 53
54 // Close the message port. Should be called on IO thread. 54 // Close the message port. Should be called on IO thread.
55 static void ClosePort(int message_port_id); 55 static void ClosePort(int message_port_id);
56 56
57 // Queue up all the messages for this message port until ReleaseMessages
58 // is called. Should be called on IO thread.
59 static void HoldMessages(int message_port_id);
60
61 // Release any queued messages as a result of HoldMessages. Should be
62 // called on IO thread.
63 static void ReleaseMessages(int message_port_id);
64
57 // Cleanup the message ports that belong to the closing delegate. 65 // Cleanup the message ports that belong to the closing delegate.
58 static void OnMessagePortDelegateClosing(MessagePortDelegate * delegate); 66 static void OnMessagePortDelegateClosing(MessagePortDelegate * delegate);
59 67
60 private: 68 private:
61 DISALLOW_IMPLICIT_CONSTRUCTORS(MessagePortProvider); 69 DISALLOW_IMPLICIT_CONSTRUCTORS(MessagePortProvider);
62 }; 70 };
63 71
64 } // namespace content 72 } // namespace content
65 73
66 #endif // CONTENT_PUBLIC_BROWSER_MESSAGE_PORT_PROVIDER_H_ 74 #endif // CONTENT_PUBLIC_BROWSER_MESSAGE_PORT_PROVIDER_H_
OLDNEW
« no previous file with comments | « content/browser/message_port_provider.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698