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

Unified Diff: components/plugins/renderer/webview_plugin.cc

Issue 1512103002: Create a WebFrameWidget for WebViewPlugin. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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
« no previous file with comments | « components/plugins/renderer/webview_plugin.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/plugins/renderer/webview_plugin.cc
diff --git a/components/plugins/renderer/webview_plugin.cc b/components/plugins/renderer/webview_plugin.cc
index 5e185c19f74a27039f78b1967f7e8b6c18e0cf7e..c670751f1c714ef5494c378d6aa4e399ff0e7671 100644
--- a/components/plugins/renderer/webview_plugin.cc
+++ b/components/plugins/renderer/webview_plugin.cc
@@ -17,6 +17,7 @@
#include "third_party/WebKit/public/platform/WebURLResponse.h"
#include "third_party/WebKit/public/web/WebDocument.h"
#include "third_party/WebKit/public/web/WebElement.h"
+#include "third_party/WebKit/public/web/WebFrameWidget.h"
#include "third_party/WebKit/public/web/WebInputEvent.h"
#include "third_party/WebKit/public/web/WebLocalFrame.h"
#include "third_party/WebKit/public/web/WebPluginContainer.h"
@@ -26,6 +27,7 @@ using blink::WebCanvas;
using blink::WebCursorInfo;
using blink::WebDragData;
using blink::WebDragOperationsMask;
+using blink::WebFrameWidget;
using blink::WebImage;
using blink::WebInputEvent;
using blink::WebLocalFrame;
@@ -55,8 +57,13 @@ WebViewPlugin::WebViewPlugin(content::RenderView* render_view,
// ApplyWebPreferences before making a WebLocalFrame so that the frame sees a
// consistent view of our preferences.
content::RenderView::ApplyWebPreferences(preferences, web_view_);
- web_frame_ = WebLocalFrame::create(blink::WebTreeScopeType::Document, this);
+ WebLocalFrame* web_local_frame =
+ WebLocalFrame::create(blink::WebTreeScopeType::Document, this);
+ web_frame_ = web_local_frame;
web_view_->setMainFrame(web_frame_);
+ // TODO(dcheng): The main frame widget currently has a special case.
+ // Eliminate this once WebView is no longer a WebWidget.
+ web_frame_widget_ = WebFrameWidget::create(this, web_view_, web_local_frame);
}
// static
@@ -72,6 +79,7 @@ WebViewPlugin* WebViewPlugin::Create(content::RenderView* render_view,
}
WebViewPlugin::~WebViewPlugin() {
+ web_frame_widget_->close();
web_view_->close();
web_frame_->close();
}
« no previous file with comments | « components/plugins/renderer/webview_plugin.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698