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

Unified Diff: content/browser/web_contents/web_contents_android.cc

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
Index: content/browser/web_contents/web_contents_android.cc
diff --git a/content/browser/web_contents/web_contents_android.cc b/content/browser/web_contents/web_contents_android.cc
index c373a2060f6f4e442b9338f7d189acc35f3e9c48..52c4520f565aaab36c69560907c974fd0d3944f6 100644
--- a/content/browser/web_contents/web_contents_android.cc
+++ b/content/browser/web_contents/web_contents_android.cc
@@ -29,7 +29,6 @@
#include "content/common/frame_messages.h"
#include "content/common/input_messages.h"
#include "content/common/view_messages.h"
-#include "content/public/browser/android/app_web_message_port_service.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/message_port_provider.h"
@@ -574,24 +573,9 @@ void WebContentsAndroid::PostMessageToFrame(
const JavaParamRef<jstring>& jmessage,
const JavaParamRef<jstring>& jsource_origin,
const JavaParamRef<jstring>& jtarget_origin,
- const JavaParamRef<jintArray>& jsent_ports) {
- base::string16 source_origin(ConvertJavaStringToUTF16(env, jsource_origin));
- base::string16 target_origin(ConvertJavaStringToUTF16(env, jtarget_origin));
- base::string16 message(ConvertJavaStringToUTF16(env, jmessage));
- std::vector<int> ports;
-
- if (!jsent_ports.is_null())
- base::android::JavaIntArrayToIntVector(env, jsent_ports, &ports);
+ const JavaParamRef<jobjectArray>& jports) {
content::MessagePortProvider::PostMessageToFrame(
- web_contents_, source_origin, target_origin, message, ports);
-}
-
-void WebContentsAndroid::CreateMessageChannel(
- JNIEnv* env,
- const JavaParamRef<jobject>& obj,
- const JavaParamRef<jobjectArray>& ports) {
- content::MessagePortProvider::GetAppWebMessagePortService()
- ->CreateMessageChannel(env, ports, web_contents_);
+ web_contents_, env, jsource_origin, jtarget_origin, jmessage, jports);
}
jboolean WebContentsAndroid::HasAccessedInitialDocument(
« no previous file with comments | « content/browser/web_contents/web_contents_android.h ('k') | content/browser/web_contents/web_contents_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698