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

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

Issue 956763002: Implement the close() API for Message ports (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address Nasko review 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 29 matching lines...) Expand all
40 // to the message port numbers. 40 // to the message port numbers.
41 static void CreateMessageChannel(MessagePortDelegate* delegate, 41 static void CreateMessageChannel(MessagePortDelegate* delegate,
42 int* port1, 42 int* port1,
43 int* port2); 43 int* port2);
44 44
45 // Posts a MessageEvent to a message port associated with a message channel. 45 // Posts a MessageEvent to a message port associated with a message channel.
46 static void PostMessageToPort(int sender_port_id, 46 static void PostMessageToPort(int sender_port_id,
47 const base::string16& data, 47 const base::string16& data,
48 const std::vector<int>& sent_ports); 48 const std::vector<int>& sent_ports);
49 49
50 // Close the message port. Should be called on IO thread.
51 static void ClosePort(int message_port_id);
52
50 // Cleanup the message ports that belong to the closing delegate. 53 // Cleanup the message ports that belong to the closing delegate.
51 static void OnMessagePortDelegateClosing(MessagePortDelegate * delegate); 54 static void OnMessagePortDelegateClosing(MessagePortDelegate * delegate);
52 55
53 private: 56 private:
54 DISALLOW_IMPLICIT_CONSTRUCTORS(MessagePortProvider); 57 DISALLOW_IMPLICIT_CONSTRUCTORS(MessagePortProvider);
55 }; 58 };
56 59
57 } // namespace content 60 } // namespace content
58 61
59 #endif // CONTENT_PUBLIC_BROWSER_MESSAGE_PORT_PROVIDER_H_ 62 #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