diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-11 19:12:36 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-11 19:12:36 +0000 |
commit | 3e076a8cc7a0f858b6ba3f563fca6716f889e1fe (patch) | |
tree | 02093584c074ae513f486683f585b82969901a3b /webkit/plugins | |
parent | e9c180b08c7464bfa37268175f9dac862c7eaac7 (diff) | |
download | chromium_src-3e076a8cc7a0f858b6ba3f563fca6716f889e1fe.zip chromium_src-3e076a8cc7a0f858b6ba3f563fca6716f889e1fe.tar.gz chromium_src-3e076a8cc7a0f858b6ba3f563fca6716f889e1fe.tar.bz2 |
Initial NPAPI plugin support in Win Aura.
Scrolling jank is noticable because the plugin moves at a different time than the content is updated. There are also a couple of other functions in RenderWidgetHostViewWin that enumerate plugin Windows that need to be shared, but I'm leaving these for a future change.
The code in render_widget_host_view_base.cc is all moved from render_widget_host_view_win.cc with the exception of the lines between the USE_AURA ifdef.
Review URL: https://codereview.chromium.org/10905122
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@156090 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/plugins')
-rw-r--r-- | webkit/plugins/npapi/webplugin_delegate_impl.h | 25 | ||||
-rw-r--r-- | webkit/plugins/npapi/webplugin_delegate_impl_win.cc | 3 |
2 files changed, 15 insertions, 13 deletions
diff --git a/webkit/plugins/npapi/webplugin_delegate_impl.h b/webkit/plugins/npapi/webplugin_delegate_impl.h index 3a35703..5a5d96b 100644 --- a/webkit/plugins/npapi/webplugin_delegate_impl.h +++ b/webkit/plugins/npapi/webplugin_delegate_impl.h @@ -10,6 +10,7 @@ #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" +#include "base/memory/weak_ptr.h" #include "base/sequenced_task_runner_helpers.h" #include "base/time.h" #include "base/timer.h" @@ -21,10 +22,6 @@ #include "webkit/plugins/npapi/webplugin_delegate.h" #include "webkit/plugins/webkit_plugins_export.h" -#if defined(OS_WIN) && !defined(USE_AURA) -#include "base/memory/weak_ptr.h" -#endif - #if defined(USE_X11) #include "ui/base/x/x11_util.h" @@ -53,7 +50,7 @@ class WebPluginAcceleratedSurface; class ExternalDragTracker; #endif // OS_MACOSX -#if defined(OS_WIN) && !defined(USE_AURA) +#if defined(OS_WIN) class WebPluginIMEWin; #endif // OS_WIN @@ -88,15 +85,17 @@ class WEBKIT_PLUGINS_EXPORT WebPluginDelegateImpl : public WebPluginDelegate { const std::string& mime_type, gfx::PluginWindowHandle containing_view); - static bool IsPluginDelegateWindow(gfx::NativeWindow window); - static bool GetPluginNameFromWindow(gfx::NativeWindow window, +#if defined(OS_WIN) + static bool IsPluginDelegateWindow(HWND window); + static bool GetPluginNameFromWindow(HWND window, string16* plugin_name); - static bool GetPluginVersionFromWindow(gfx::NativeWindow window, + static bool GetPluginVersionFromWindow(HWND window, string16* plugin_version); // Returns true if the window handle passed in is that of the dummy // activation window for windowless plugins. - static bool IsDummyActivationWindow(gfx::NativeWindow window); + static bool IsDummyActivationWindow(HWND window); +#endif // WebPluginDelegate implementation virtual bool Initialize(const GURL& url, @@ -148,7 +147,7 @@ class WEBKIT_PLUGINS_EXPORT WebPluginDelegateImpl : public WebPluginDelegate { // Informs the plugin that the view it is in has gained or lost focus. void SetContentAreaHasFocus(bool has_focus); -#if defined(OS_WIN) && !defined(USE_AURA) +#if defined(OS_WIN) // Informs the plug-in that an IME has changed its status. void ImeCompositionUpdated(const string16& text, const std::vector<int>& clauses, @@ -332,7 +331,7 @@ class WEBKIT_PLUGINS_EXPORT WebPluginDelegateImpl : public WebPluginDelegate { WebPlugin* plugin_; scoped_refptr<PluginInstance> instance_; -#if defined(OS_WIN) && !defined(USE_AURA) +#if defined(OS_WIN) // Original wndproc before we subclassed. WNDPROC plugin_wnd_proc_; @@ -372,7 +371,7 @@ class WEBKIT_PLUGINS_EXPORT WebPluginDelegateImpl : public WebPluginDelegate { gfx::Rect clip_rect_; int quirks_; -#if defined(OS_WIN) && !defined(USE_AURA) +#if defined(OS_WIN) // Windowless plugins don't have keyboard focus causing issues with the // plugin not receiving keyboard events if the plugin enters a modal // loop like TrackPopupMenuEx or MessageBox, etc. @@ -500,7 +499,7 @@ class WEBKIT_PLUGINS_EXPORT WebPluginDelegateImpl : public WebPluginDelegate { // The url with which the plugin was instantiated. std::string plugin_url_; -#if defined(OS_WIN) && !defined(USE_AURA) +#if defined(OS_WIN) // Indicates the end of a user gesture period. void OnUserGestureEnd(); diff --git a/webkit/plugins/npapi/webplugin_delegate_impl_win.cc b/webkit/plugins/npapi/webplugin_delegate_impl_win.cc index 594d61f..4e4273db 100644 --- a/webkit/plugins/npapi/webplugin_delegate_impl_win.cc +++ b/webkit/plugins/npapi/webplugin_delegate_impl_win.cc @@ -1515,6 +1515,8 @@ bool WebPluginDelegateImpl::PlatformHandleInputEvent( // exceptions, such as IME, where it sometimes returns true. ret = true; +// TODO(jam): do we need this for Aura? +#if !defined(USE_AURA) if (np_event.event == WM_MOUSEMOVE) { current_windowless_cursor_.InitFromExternalCursor(GetCursor()); // Snag a reference to the current cursor ASAP in case the plugin modified @@ -1522,6 +1524,7 @@ bool WebPluginDelegateImpl::PlatformHandleInputEvent( // as someone might be setting the cursor in the main process as well. current_windowless_cursor_.GetCursorInfo(cursor_info); } +#endif handle_event_depth_--; |