diff options
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/renderer_host/render_widget_host_view_win.cc | 8 | ||||
-rw-r--r-- | chrome/plugin/webplugin_proxy.h | 6 | ||||
-rw-r--r-- | chrome/renderer/webplugin_delegate_pepper.cc | 2 |
3 files changed, 15 insertions, 1 deletions
diff --git a/chrome/browser/renderer_host/render_widget_host_view_win.cc b/chrome/browser/renderer_host/render_widget_host_view_win.cc index d6287ac..0fa926d 100644 --- a/chrome/browser/renderer_host/render_widget_host_view_win.cc +++ b/chrome/browser/renderer_host/render_widget_host_view_win.cc @@ -440,10 +440,16 @@ HWND RenderWidgetHostViewWin::ReparentWindow(HWND window) { } DCHECK(window_class); + // TODO(apatrick): the parent window is disabled if the plugin window is + // disabled so that mouse messages from the plugin window are passed on to the + // browser window. This does not work for regular plugins because it prevents + // them from receiving mouse and keyboard input. WS_DISABLED is not + // needed when the GPU process stops using child windows for 3D rendering. + DWORD enabled_style = ::GetWindowLong(window, GWL_STYLE) & WS_DISABLED; HWND parent = CreateWindowEx( WS_EX_LEFT | WS_EX_LTRREADING | WS_EX_RIGHTSCROLLBAR, MAKEINTATOM(window_class), 0, - WS_CHILD | WS_CLIPCHILDREN | WS_CLIPSIBLINGS, + WS_CHILD | WS_CLIPCHILDREN | WS_CLIPSIBLINGS | enabled_style, 0, 0, 0, 0, ::GetParent(window), 0, GetModuleHandle(NULL), 0); DCHECK(parent); ::SetParent(window, parent); diff --git a/chrome/plugin/webplugin_proxy.h b/chrome/plugin/webplugin_proxy.h index 2e86bbd..4a91685 100644 --- a/chrome/plugin/webplugin_proxy.h +++ b/chrome/plugin/webplugin_proxy.h @@ -42,6 +42,12 @@ class WebPluginProxy : public webkit_glue::WebPlugin { // WebPlugin overrides void SetWindow(gfx::PluginWindowHandle window); + + // Whether input events should be sent to the delegate. + virtual void SetAcceptsInputEvents(bool accepts) { + NOTREACHED(); + } + void WillDestroyWindow(gfx::PluginWindowHandle window); #if defined(OS_WIN) void SetWindowlessPumpEvent(HANDLE pump_messages_event); diff --git a/chrome/renderer/webplugin_delegate_pepper.cc b/chrome/renderer/webplugin_delegate_pepper.cc index 77c9146..e2c62a1 100644 --- a/chrome/renderer/webplugin_delegate_pepper.cc +++ b/chrome/renderer/webplugin_delegate_pepper.cc @@ -431,6 +431,8 @@ NPError WebPluginDelegatePepper::Device3DInitializeContext( std::vector<std::string>(), plugin_, false)) { + plugin_->SetAcceptsInputEvents(true); + // Ask the GPU plugin to create a command buffer and return a proxy. command_buffer_.reset(nested_delegate_->CreateCommandBuffer()); if (command_buffer_.get()) { |