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

Unified Diff: android_webview/native/aw_contents.cc

Issue 944443003: Step two of optionally sending messages to/from message ports as base::Value. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@n-c-message-as-values-take2
Patch Set: use auto where it makes sense 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 side-by-side diff with in-line comments
Download patch
Index: android_webview/native/aw_contents.cc
diff --git a/android_webview/native/aw_contents.cc b/android_webview/native/aw_contents.cc
index 858047820c966a20833a69fe0c0db2e6879a8c5a..e192656d658e84743dd6e7be94758c48056b79c3 100644
--- a/android_webview/native/aw_contents.cc
+++ b/android_webview/native/aw_contents.cc
@@ -60,6 +60,7 @@
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/web_contents.h"
+#include "content/public/common/message_port_types.h"
#include "content/public/common/renderer_preferences.h"
#include "content/public/common/ssl_status.h"
#include "jni/AwContents_jni.h"
@@ -1113,11 +1114,14 @@ void AwContents::PostMessageToFrame(JNIEnv* env, jobject obj,
base::Unretained(AwMessagePortServiceImpl::GetInstance()),
j_ports));
}
+ std::vector<content::TransferredMessagePort> ports(j_ports.size());
+ for (size_t i = 0; i < j_ports.size(); ++i)
+ ports[i].id = j_ports[i];
content::MessagePortProvider::PostMessageToFrame(web_contents_.get(),
source_origin,
j_target_origin,
j_message,
- j_ports);
+ ports);
}
scoped_refptr<AwMessagePortMessageFilter>
« no previous file with comments | « android_webview/browser/aw_message_port_message_filter.cc ('k') | content/browser/message_port_message_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698