Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(156)

Unified Diff: webkit/tools/test_shell/test_webview_delegate.cc

Issue 181014: Eliminate remaining WebCore dependencies from webplugin_impl.cc... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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) {

Powered by Google App Engine
This is Rietveld 408576698