| Index: content/browser/android/content_view_core_impl.cc
|
| diff --git a/content/browser/android/content_view_core_impl.cc b/content/browser/android/content_view_core_impl.cc
|
| index 16e83d8a457ae3969bb8eed13a164c4879ec6290..a411c910fe2318f858ed20336a0660d3c4ba80a7 100644
|
| --- a/content/browser/android/content_view_core_impl.cc
|
| +++ b/content/browser/android/content_view_core_impl.cc
|
| @@ -1423,6 +1423,26 @@ void ContentViewCoreImpl::EvaluateJavaScript(JNIEnv* env,
|
| c_callback);
|
| }
|
|
|
| +// TODO(sgurun) add support for posting a frame whose name is known (only
|
| +// main frame is supported at this time, see crbug.com/389721)
|
| +// TODO(sgurun) add support for passing message ports
|
| +void ContentViewCoreImpl::PostMessageToFrame(JNIEnv* env, jobject obj,
|
| + jstring frame_name, jstring message, jstring source_origin,
|
| + jstring target_origin) {
|
| +
|
| + RenderViewHost* host = web_contents_->GetRenderViewHost();
|
| + if (!host)
|
| + return;
|
| + ViewMsg_PostMessage_Params params;
|
| + params.source_origin = ConvertJavaStringToUTF16(env, source_origin);
|
| + params.target_origin = ConvertJavaStringToUTF16(env, target_origin);
|
| + params.data = ConvertJavaStringToUTF16(env, message);
|
| + params.is_data_raw_string = true;
|
| + params.source_routing_id = MSG_ROUTING_NONE;
|
| + host->Send(new ViewMsg_PostMessageEvent(host->GetRoutingID(), params));
|
| +}
|
| +
|
| +
|
| bool ContentViewCoreImpl::GetUseDesktopUserAgent(
|
| JNIEnv* env, jobject obj) {
|
| NavigationEntry* entry = web_contents_->GetController().GetVisibleEntry();
|
|
|