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

Unified Diff: content/public/browser/message_port_provider.h

Issue 2422793002: HTML MessagePort as mojo::MessagePipeHandle (Closed)
Patch Set: Add missing ScopedAsyncTaskScheduler instance for the new unit tests; required by a recent change t… Created 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/public/browser/message_port_delegate.h ('k') | content/renderer/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/browser/message_port_provider.h
diff --git a/content/public/browser/message_port_provider.h b/content/public/browser/message_port_provider.h
index 5d997960066832db152b5edbd8bd2ce975f9f101..4a879e07524a068a855a8c9d53f94eb305e8caa1 100644
--- a/content/public/browser/message_port_provider.h
+++ b/content/public/browser/message_port_provider.h
@@ -12,17 +12,18 @@
#include "base/strings/string16.h"
#include "content/common/content_export.h"
-namespace content {
+#if defined(OS_ANDROID)
+#include "base/android/scoped_java_ref.h"
+#endif
-class AppWebMessagePortService;
+namespace content {
class WebContents;
// An interface consisting of methods that can be called to use Message ports.
class CONTENT_EXPORT MessagePortProvider {
public:
// Posts a MessageEvent to the main frame using the given source and target
- // origins and data. The caller may also provide any message port ids as
- // part of the message.
+ // origins and data.
// See https://html.spec.whatwg.org/multipage/comms.html#messageevent for
// further information on message events.
// Should be called on UI thread.
@@ -30,11 +31,16 @@ class CONTENT_EXPORT MessagePortProvider {
WebContents* web_contents,
const base::string16& source_origin,
const base::string16& target_origin,
- const base::string16& data,
- const std::vector<int>& ports);
+ const base::string16& data);
#if defined(OS_ANDROID)
- static content::AppWebMessagePortService* GetAppWebMessagePortService();
+ static void PostMessageToFrame(
+ WebContents* web_contents,
+ JNIEnv* env,
+ const base::android::JavaParamRef<jstring>& source_origin,
+ const base::android::JavaParamRef<jstring>& target_origin,
+ const base::android::JavaParamRef<jstring>& data,
+ const base::android::JavaParamRef<jobjectArray>& ports);
#endif
private:
« no previous file with comments | « content/public/browser/message_port_delegate.h ('k') | content/renderer/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698