summaryrefslogtreecommitdiffstats
path: root/content/port
diff options
context:
space:
mode:
authorananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-11-26 00:22:23 +0000
committerananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-11-26 00:22:23 +0000
commit28de5f6e8f663386e09ee0a95773d4a983aa427d (patch)
tree12fbe40d123099995eeec632adf7dca07ab33d38 /content/port
parentb70bb0147cbe196499f292c118393f809fe65d88 (diff)
downloadchromium_src-28de5f6e8f663386e09ee0a95773d4a983aa427d.zip
chromium_src-28de5f6e8f663386e09ee0a95773d4a983aa427d.tar.gz
chromium_src-28de5f6e8f663386e09ee0a95773d4a983aa427d.tar.bz2
Fix windowless NPAPI Flash videos not working on certain sites.
This is a continuation of the previous patch https://codereview.chromium.org/69953030 which addressed this on some sites. We intercepted the WindowFromPoint API in that patch and returned the handle to the dummy plugin window. There was a bug in the WindowFromPoint patch which was returning the first available child window in the parent window hierarchy. We need to invoke the ChildWindowFromPoint API to get the actual child window and return it if it is the dummy window. The other changes are as below:- 1. The RenderWidgetHostViewAura class was not destroying the dummy window when the instance was destroyed. 2. When the RenderWidgetHostViewAura class is hidden due to the user switching to another tab, we set the bounds of the hidden window to 0. When the RenderWidgetHostViewAura instance is shown we restore the bounds of the hidden window. This is to ensure that the ChildWindowFromPoint function used in the plugin process returns the correct HWND. 3. When the RenderWidgetHostViewAura instance is added to a root window we need to reparent the dummy plugin window to the new window. This magic happens in the RenderWidgetHostImpl::ParentChanged function. Previously we were reparenting the dummy windows in the plugin process. With the dummy plugin window in the browser hierarchy we only need to reparent this window to the new browser window. 4. We have a new method GetPluginViewId in the RenderWidgetHostViewPort interface for Aura Windows. This returns the dummy plugin parent window. Fixes bug https://code.google.com/p/chromium/issues/detail?id=301548 BUG=301548 R=cpu@chromium.org, jam@chromium.org, jam Review URL: https://codereview.chromium.org/83633007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@237193 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/port')
-rw-r--r--content/port/browser/render_widget_host_view_port.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/content/port/browser/render_widget_host_view_port.h b/content/port/browser/render_widget_host_view_port.h
index fd8954f..c8774a1 100644
--- a/content/port/browser/render_widget_host_view_port.h
+++ b/content/port/browser/render_widget_host_view_port.h
@@ -5,6 +5,7 @@
#ifndef CONTENT_PORT_BROWSER_RENDER_WIDGET_HOST_VIEW_PORT_H_
#define CONTENT_PORT_BROWSER_RENDER_WIDGET_HOST_VIEW_PORT_H_
+#include "base/basictypes.h"
#include "base/callback.h"
#include "base/memory/scoped_ptr.h"
#include "base/process/kill.h"
@@ -341,6 +342,10 @@ class CONTENT_EXPORT RenderWidgetHostViewPort : public RenderWidgetHostView,
#if defined(OS_WIN) && defined(USE_AURA)
virtual void SetParentNativeViewAccessible(
gfx::NativeViewAccessible accessible_parent) = 0;
+
+ // Returns an HWND that's given as the parent window for windowless Flash to
+ // workaround crbug.com/301548.
+ virtual gfx::NativeViewId GetParentForWindowlessPlugin() const = 0;
#endif
};