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

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

Issue 2422793002: HTML MessagePort as mojo::MessagePipeHandle (Closed)
Patch Set: Eliminate unnecessary PostTask 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 412213d1be94836d1502d3bf05a125b6f8dcee25..680ebbc18930ff6123e05ebe6e2cf915b5fb00d7 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"
@@ -565,24 +564,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(

Powered by Google App Engine
This is Rietveld 408576698