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

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

Issue 869133005: Post a Message from Java to JS (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: spelling fix Created 5 years, 10 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 24 matching lines...) Expand all
35 // Creates a message channel and provide the ids of the message ports that are 35 // Creates a message channel and provide the ids of the message ports that are
36 // associated with this message channel. 36 // associated with this message channel.
37 // See https://html.spec.whatwg.org/multipage/comms.html#messagechannel 37 // See https://html.spec.whatwg.org/multipage/comms.html#messagechannel
38 // Should be called on IO thread. 38 // Should be called on IO thread.
39 // The message ports that are created will have their routing id numbers equal 39 // The message ports that are created will have their routing id numbers equal
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.
46 static void PostMessageToPort(int sender_port_id,
47 const base::string16& data,
48 const std::vector<int>& sent_ports);
49
45 // Cleanup the message ports that belong to the closing delegate. 50 // Cleanup the message ports that belong to the closing delegate.
46 static void OnMessagePortDelegateClosing(MessagePortDelegate * delegate); 51 static void OnMessagePortDelegateClosing(MessagePortDelegate * delegate);
47 52
48 private: 53 private:
49 DISALLOW_IMPLICIT_CONSTRUCTORS(MessagePortProvider); 54 DISALLOW_IMPLICIT_CONSTRUCTORS(MessagePortProvider);
50 }; 55 };
51 56
52 } // namespace content 57 } // namespace content
53 58
54 #endif // CONTENT_PUBLIC_BROWSER_MESSAGE_PORT_PROVIDER_H_ 59 #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