diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-14 19:23:25 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-14 19:23:25 +0000 |
commit | b32dd4631c5142da0345147918ce200aa23d1f4f (patch) | |
tree | d746ad7e961915d5e545ca6ab43e4d9c07b03e8c | |
parent | 6a98903971dc62cbb7c67510ea559a51d21222c7 (diff) | |
download | chromium_src-b32dd4631c5142da0345147918ce200aa23d1f4f.zip chromium_src-b32dd4631c5142da0345147918ce200aa23d1f4f.tar.gz chromium_src-b32dd4631c5142da0345147918ce200aa23d1f4f.tar.bz2 |
Revert changes accidentally checked in with my property changes.
TEST=none
BUG=none
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49708 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/renderer/pepper_plugin_delegate_impl.cc | 38 | ||||
-rw-r--r-- | chrome/renderer/pepper_plugin_delegate_impl.h | 11 | ||||
-rwxr-xr-x | chrome/renderer/render_view.cc | 34 | ||||
-rw-r--r-- | chrome/test/ui/ppapi_uitest.cc | 2 |
4 files changed, 13 insertions, 72 deletions
diff --git a/chrome/renderer/pepper_plugin_delegate_impl.cc b/chrome/renderer/pepper_plugin_delegate_impl.cc index b2a4931..535dff1 100644 --- a/chrome/renderer/pepper_plugin_delegate_impl.cc +++ b/chrome/renderer/pepper_plugin_delegate_impl.cc @@ -6,7 +6,6 @@ #include "app/surface/transport_dib.h" #include "base/scoped_ptr.h" -#include "webkit/glue/plugins/pepper_plugin_instance.h" #if defined(OS_MACOSX) #include "chrome/common/render_messages.h" @@ -47,43 +46,6 @@ PepperPluginDelegateImpl::PepperPluginDelegateImpl(RenderView* render_view) : render_view_(render_view) { } -void PepperPluginDelegateImpl::ViewInitiatedPaint() { - // Notify all of our instances that we started painting. This is used for - // internal bookkeeping only, so we know that the set can not change under - // us. - for (std::set<pepper::PluginInstance*>::iterator i = - active_instances_.begin(); - i != active_instances_.end(); ++i) - (*i)->ViewInitiatedPaint(); -} - -void PepperPluginDelegateImpl::ViewFlushedPaint() { - // Notify all instances that we painted. This will call into the plugin, and - // we it may ask to close itself as a result. This will, in turn, modify our - // set, possibly invalidating the iterator. So we iterate on a copy that - // won't change out from under us. - std::set<pepper::PluginInstance*> plugins = active_instances_; - for (std::set<pepper::PluginInstance*>::iterator i = plugins.begin(); - i != plugins.end(); ++i) { - // The copy above makes sure our iterator is never invalid if some plugins - // are destroyed. But some plugin may decide to close all of its views in - // response to a paint in one of them, so we need to make sure each one is - // still "current" before using it. - if (active_instances_.find(*i) != active_instances_.end()) - (*i)->ViewFlushedPaint(); - } -} - -void PepperPluginDelegateImpl::InstanceCreated( - pepper::PluginInstance* instance) { - active_instances_.insert(instance); -} - -void PepperPluginDelegateImpl::InstanceDeleted( - pepper::PluginInstance* instance) { - active_instances_.erase(instance); -} - pepper::PluginDelegate::PlatformImage2D* PepperPluginDelegateImpl::CreateImage2D(int width, int height) { uint32 buffer_size = width * height * 4; diff --git a/chrome/renderer/pepper_plugin_delegate_impl.h b/chrome/renderer/pepper_plugin_delegate_impl.h index 058a79c..870a032 100644 --- a/chrome/renderer/pepper_plugin_delegate_impl.h +++ b/chrome/renderer/pepper_plugin_delegate_impl.h @@ -5,8 +5,6 @@ #ifndef CHROME_RENDERER_PEPPER_PLUGIN_DELEGATE_IMPL_H_ #define CHROME_RENDERER_PEPPER_PLUGIN_DELEGATE_IMPL_H_ -#include <set> - #include "base/basictypes.h" #include "base/weak_ptr.h" #include "webkit/glue/plugins/pepper_plugin_delegate.h" @@ -19,22 +17,13 @@ class PepperPluginDelegateImpl public: explicit PepperPluginDelegateImpl(RenderView* render_view); - // Called by RenderView to tell us about painting events, these two functions - // just correspond to the DidInitiatePaint and DidFlushPaint in R.V.. - void ViewInitiatedPaint(); - void ViewFlushedPaint(); - // pepper::PluginDelegate implementation. - virtual void InstanceCreated(pepper::PluginInstance* instance); - virtual void InstanceDeleted(pepper::PluginInstance* instance); virtual PlatformImage2D* CreateImage2D(int width, int height); private: // Pointer to the RenderView that owns us. RenderView* render_view_; - std::set<pepper::PluginInstance*> active_instances_; - DISALLOW_COPY_AND_ASSIGN(PepperPluginDelegateImpl); }; diff --git a/chrome/renderer/render_view.cc b/chrome/renderer/render_view.cc index 77ab1f9..29f0f1a 100755 --- a/chrome/renderer/render_view.cc +++ b/chrome/renderer/render_view.cc @@ -3266,7 +3266,7 @@ webkit_glue::WebPluginDelegate* RenderView::CreatePluginDelegate( if (use_pepper_host) { WebPluginDelegatePepper* pepper_plugin = WebPluginDelegatePepper::Create(file_path, mime_type, AsWeakPtr()); - current_oldstyle_pepper_plugins_.insert(pepper_plugin); + current_pepper_plugins_.insert(pepper_plugin); return pepper_plugin; } else { #if defined(OS_WIN) // In-proc plugins aren't supported on Linux or Mac. @@ -3779,12 +3779,12 @@ void RenderView::InsertCSS(const std::wstring& frame_xpath, void RenderView::OnPepperPluginDestroy( WebPluginDelegatePepper* pepper_plugin) { std::set<WebPluginDelegatePepper*>::iterator found_pepper = - current_oldstyle_pepper_plugins_.find(pepper_plugin); - if (found_pepper == current_oldstyle_pepper_plugins_.end()) { + current_pepper_plugins_.find(pepper_plugin); + if (found_pepper == current_pepper_plugins_.end()) { NOTREACHED(); return; } - current_oldstyle_pepper_plugins_.erase(found_pepper); + current_pepper_plugins_.erase(found_pepper); // The plugin could have been destroyed while it was waiting for a file // choose callback, so check all pending completion callbacks and NULL them. @@ -4280,15 +4280,12 @@ void RenderView::OnResize(const gfx::Size& new_size, } void RenderView::DidInitiatePaint() { - // Notify the pepper plugins that we started painting. - pepper_delegate_.ViewInitiatedPaint(); - - // Notify any "old-style" pepper plugins that we started painting. This is - // used for internal bookkeeping only, so we know that the set can not change - // under us. + // Notify any pepper plugins that we started painting. The plugin "should" + // never notified that we started painting, this is used for internal + // bookkeeping only, so we know that the set can not change under us. for (std::set<WebPluginDelegatePepper*>::iterator i = - current_oldstyle_pepper_plugins_.begin(); - i != current_oldstyle_pepper_plugins_.end(); ++i) + current_pepper_plugins_.begin(); + i != current_pepper_plugins_.end(); ++i) (*i)->RenderViewInitiatedPaint(); } @@ -4297,22 +4294,14 @@ void RenderView::DidFlushPaint() { // and we it may ask to close itself as a result. This will, in turn, modify // our set, possibly invalidating the iterator. So we iterate on a copy that // won't change out from under us. - pepper_delegate_.ViewFlushedPaint(); - - // Notify any old-style pepper plugins that we painted. This will call into - // the plugin, and we it may ask to close itself as a result. This will, in - // turn, modify our set, possibly invalidating the iterator. So we iterate on - // a copy that won't change out from under us. - // This should be deleted when we don't support old Pepper anymore. - std::set<WebPluginDelegatePepper*> plugins = current_oldstyle_pepper_plugins_; + std::set<WebPluginDelegatePepper*> plugins = current_pepper_plugins_; for (std::set<WebPluginDelegatePepper*>::iterator i = plugins.begin(); i != plugins.end(); ++i) { // The copy above makes sure our iterator is never invalid if some plugins // are destroyed. But some plugin may decide to close all of its views in // response to a paint in one of them, so we need to make sure each one is // still "current" before using it. - if (current_oldstyle_pepper_plugins_.find(*i) != - current_oldstyle_pepper_plugins_.end()) + if (current_pepper_plugins_.find(*i) != current_pepper_plugins_.end()) (*i)->RenderViewFlushedPaint(); } @@ -4336,6 +4325,7 @@ void RenderView::DidFlushPaint() { } } + void RenderView::OnClearFocusedNode() { if (webview()) webview()->clearFocusedNode(); diff --git a/chrome/test/ui/ppapi_uitest.cc b/chrome/test/ui/ppapi_uitest.cc index 27de9b1..822ee70 100644 --- a/chrome/test/ui/ppapi_uitest.cc +++ b/chrome/test/ui/ppapi_uitest.cc @@ -76,7 +76,7 @@ class PPAPITest : public UITest { }; // TODO(brettw) fails on Mac, Linux 64 & Windows for unknown reasons. -TEST_F(PPAPITest, DeviceContext2D) { +TEST_F(PPAPITest, DISABLED_DeviceContext2D) { RunTest(FILE_PATH_LITERAL("test_device_context_2d.html")); } |