| Index: chrome/browser/extensions/api/messaging/message_service.cc
|
| diff --git a/chrome/browser/extensions/api/messaging/message_service.cc b/chrome/browser/extensions/api/messaging/message_service.cc
|
| index 65f74edd11fed2dc92af7e520d472f3bc32e2f6a..00e40f7eb03c132604c0b46838e07430c6b5d75d 100644
|
| --- a/chrome/browser/extensions/api/messaging/message_service.cc
|
| +++ b/chrome/browser/extensions/api/messaging/message_service.cc
|
| @@ -34,6 +34,8 @@
|
| #include "content/public/browser/notification_service.h"
|
| #include "content/public/browser/render_process_host.h"
|
| #include "content/public/browser/render_view_host.h"
|
| +#include "content/public/browser/render_widget_host.h"
|
| +#include "content/public/browser/render_widget_host_view.h"
|
| #include "content/public/browser/site_instance.h"
|
| #include "content/public/browser/web_contents.h"
|
| #include "url/gurl.h"
|
| @@ -321,8 +323,14 @@ void MessageService::OpenChannelToNativeApp(
|
| channel->opener.reset(new ExtensionMessagePort(source, MSG_ROUTING_CONTROL,
|
| source_extension_id));
|
|
|
| + // Get handle of the native view and pass it to the native messaging host.
|
| + gfx::NativeView native_view =
|
| + content::RenderWidgetHost::FromID(source_process_id, source_routing_id)->
|
| + GetView()->GetNativeView();
|
| +
|
| scoped_ptr<NativeMessageProcessHost> native_process =
|
| NativeMessageProcessHost::Create(
|
| + native_view,
|
| base::WeakPtr<NativeMessageProcessHost::Client>(
|
| weak_factory_.GetWeakPtr()),
|
| source_extension_id, native_app_name, receiver_port_id);
|
|
|