summaryrefslogtreecommitdiffstats
path: root/components
diff options
context:
space:
mode:
authordcheng@chromium.org <dcheng@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-20 02:49:56 +0000
committerdcheng@chromium.org <dcheng@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-20 02:49:56 +0000
commit180ab7e2fca1f1a4e1431dba77806ab91737070a (patch)
tree9fac03f823d1599be56c07b930f69b79f869ec7e /components
parent068793e8ac74568ed93f6fb7330643bb689e33d4 (diff)
downloadchromium_src-180ab7e2fca1f1a4e1431dba77806ab91737070a.zip
chromium_src-180ab7e2fca1f1a4e1431dba77806ab91737070a.tar.gz
chromium_src-180ab7e2fca1f1a4e1431dba77806ab91737070a.tar.bz2
Convert remaining uses of WebView::initializeMainFrame to setMainFrame.
This is the Chrome-side change. Fixing this makes inverting the owning relationship between WebFrame and Frame easier. BUG=329266 R=ajwong@chromium.org, bauerb@chromium.org, boliu@chromium.org, ddorwin@chromium.org, scottbyer@chromium.org Review URL: https://codereview.chromium.org/114773003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@242016 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'components')
-rw-r--r--components/plugins/renderer/webview_plugin.cc14
-rw-r--r--components/plugins/renderer/webview_plugin.h2
2 files changed, 12 insertions, 4 deletions
diff --git a/components/plugins/renderer/webview_plugin.cc b/components/plugins/renderer/webview_plugin.cc
index 7d8b9fe..ccacc06 100644
--- a/components/plugins/renderer/webview_plugin.cc
+++ b/components/plugins/renderer/webview_plugin.cc
@@ -42,9 +42,12 @@ using blink::WebVector;
using blink::WebView;
WebViewPlugin::WebViewPlugin(WebViewPlugin::Delegate* delegate)
- : delegate_(delegate), container_(NULL), finished_loading_(false) {
- web_view_ = WebView::create(this);
- web_view_->initializeMainFrame(this);
+ : delegate_(delegate),
+ container_(NULL),
+ web_view_(WebView::create(this)),
+ web_frame_(WebFrame::create(this)),
+ finished_loading_(false) {
+ web_view_->setMainFrame(web_frame_);
}
// static
@@ -59,7 +62,10 @@ WebViewPlugin* WebViewPlugin::Create(WebViewPlugin::Delegate* delegate,
return plugin;
}
-WebViewPlugin::~WebViewPlugin() { web_view_->close(); }
+WebViewPlugin::~WebViewPlugin() {
+ web_view_->close();
+ web_frame_->close();
+}
void WebViewPlugin::ReplayReceivedData(WebPlugin* plugin) {
if (!response_.isNull()) {
diff --git a/components/plugins/renderer/webview_plugin.h b/components/plugins/renderer/webview_plugin.h
index e4482f8..8ec76c4 100644
--- a/components/plugins/renderer/webview_plugin.h
+++ b/components/plugins/renderer/webview_plugin.h
@@ -143,6 +143,8 @@ class WebViewPlugin : public blink::WebPlugin,
blink::WebPluginContainer* container_;
// Owned by us, deleted via |close()|.
blink::WebView* web_view_;
+ // Owned by us, deleted via |close()|.
+ blink::WebFrame* web_frame_;
gfx::Rect rect_;
blink::WebURLResponse response_;