Index: webkit/tools/test_shell/test_webview_delegate.cc |
=================================================================== |
--- webkit/tools/test_shell/test_webview_delegate.cc (revision 25087) |
+++ webkit/tools/test_shell/test_webview_delegate.cc (working copy) |
@@ -38,6 +38,7 @@ |
#include "webkit/glue/media/media_resource_loader_bridge_factory.h" |
#include "webkit/glue/media/simple_data_source.h" |
#include "webkit/glue/webdropdata.h" |
+#include "webkit/glue/webplugin_impl.h" |
#include "webkit/glue/webpreferences.h" |
#include "webkit/glue/webkit_glue.h" |
#include "webkit/glue/webview.h" |
@@ -62,6 +63,8 @@ |
using WebKit::WebHistoryItem; |
using WebKit::WebNavigationType; |
using WebKit::WebNavigationPolicy; |
+using WebKit::WebPlugin; |
+using WebKit::WebPluginParams; |
using WebKit::WebRect; |
using WebKit::WebScreenInfo; |
using WebKit::WebSize; |
@@ -184,6 +187,11 @@ |
return shell_->CreatePopupWidget(webview); |
} |
+WebPlugin* TestWebViewDelegate::CreatePlugin( |
+ WebFrame* frame, const WebPluginParams& params) { |
+ return new webkit_glue::WebPluginImpl(frame, params, AsWeakPtr()); |
+} |
+ |
WebKit::WebMediaPlayer* TestWebViewDelegate::CreateWebMediaPlayer( |
WebKit::WebMediaPlayerClient* client) { |
scoped_refptr<media::FilterFactoryCollection> factory = |
@@ -222,14 +230,6 @@ |
shell->Show(policy); |
} |
-void TestWebViewDelegate::DidStartLoading(WebView* webview) { |
- // Ignored |
-} |
- |
-void TestWebViewDelegate::DidStopLoading(WebView* webview) { |
- // Ignored |
-} |
- |
void TestWebViewDelegate::WindowObjectCleared(WebFrame* webframe) { |
shell_->BindJSObjectsToWindow(webframe); |
} |
@@ -817,7 +817,7 @@ |
prefs->Apply(shell_->webView()); |
} |
-// WebWidgetDelegate --------------------------------------------------------- |
+// WebWidgetClient ----------------------------------------------------------- |
void TestWebViewDelegate::didInvalidateRect(const WebRect& rect) { |
if (WebWidgetHost* host = GetWidgetHost()) |
@@ -869,8 +869,14 @@ |
block_redirects_(false) { |
} |
+TestWebViewDelegate::~TestWebViewDelegate() { |
+} |
+ |
void TestWebViewDelegate::Reset() { |
- *this = TestWebViewDelegate(shell_); |
+ // Do a little placement new dance... |
+ TestShell* shell = shell_; |
+ this->~TestWebViewDelegate(); |
+ new (this) TestWebViewDelegate(shell); |
} |
void TestWebViewDelegate::SetSmartInsertDeleteEnabled(bool enabled) { |