summaryrefslogtreecommitdiffstats
path: root/content/browser/web_contents/web_contents_impl.cc
diff options
context:
space:
mode:
Diffstat (limited to 'content/browser/web_contents/web_contents_impl.cc')
-rw-r--r--content/browser/web_contents/web_contents_impl.cc16
1 files changed, 9 insertions, 7 deletions
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index f089c4a..ed29f97 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -87,6 +87,8 @@
#if defined(OS_ANDROID)
#include "content/browser/android/date_time_chooser_android.h"
+#include "content/browser/renderer_host/java/java_bridge_dispatcher_host_manager.h"
+#include "content/common/java_bridge_messages.h"
#include "content/public/browser/android/content_view_core.h"
#endif
@@ -95,10 +97,6 @@
#include "ui/gl/io_surface_support_mac.h"
#endif
-#if defined(OS_ANDROID)
-#include "content/browser/renderer_host/java/java_bridge_dispatcher_host_manager.h"
-#endif
-
// Cross-Site Navigations
//
// If a WebContentsImpl is told to navigate to a different web site (as
@@ -527,6 +525,8 @@ bool WebContentsImpl::OnMessageReceived(RenderViewHost* render_view_host,
OnFindMatchRectsReply)
IPC_MESSAGE_HANDLER(ViewHostMsg_OpenDateTimeDialog,
OnOpenDateTimeDialog)
+ IPC_MESSAGE_HANDLER_DELAY_REPLY(JavaBridgeHostMsg_GetChannelHandle,
+ OnJavaBridgeGetChannelHandle)
#endif
IPC_MESSAGE_HANDLER(ViewHostMsg_MediaNotification, OnMediaNotification)
IPC_MESSAGE_UNHANDLED(handled = false)
@@ -1050,9 +1050,6 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
#if defined(OS_ANDROID)
java_bridge_dispatcher_host_manager_.reset(
new JavaBridgeDispatcherHostManager(this));
-#endif
-
-#if defined(OS_ANDROID)
date_time_chooser_.reset(new DateTimeChooserAndroid());
#endif
}
@@ -2310,6 +2307,11 @@ void WebContentsImpl::OnOpenDateTimeDialog(
value.step);
}
+void WebContentsImpl::OnJavaBridgeGetChannelHandle(IPC::Message* reply_msg) {
+ java_bridge_dispatcher_host_manager_->OnGetChannelHandle(
+ message_source_, reply_msg);
+}
+
#endif
void WebContentsImpl::OnCrashedPlugin(const base::FilePath& plugin_path,