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

Unified Diff: Source/web/WebViewImpl.cpp

Issue 23506013: Make the embedder responsible for creating the WebFrame (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add WebViewHelper for unittests. Created 7 years, 3 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: Source/web/WebViewImpl.cpp
diff --git a/Source/web/WebViewImpl.cpp b/Source/web/WebViewImpl.cpp
index a547faa892b2efc528a7301c19e1c5f558cca7cb..bdd0d3347d905a606123349e55011bc92e91f01b 100644
--- a/Source/web/WebViewImpl.cpp
+++ b/Source/web/WebViewImpl.cpp
@@ -73,6 +73,7 @@
#include "WebAutofillClient.h"
#include "WebDevToolsAgentImpl.h"
#include "WebDevToolsAgentPrivate.h"
+#include "WebFrameClient.h"
#include "WebFrameImpl.h"
#include "WebHelperPluginImpl.h"
#include "WebHitTestResult.h"
@@ -312,18 +313,11 @@ void WebView::didExitModalLoop()
pageGroupLoadDeferrerStack().removeLast();
}
-void WebViewImpl::initializeMainFrame(WebFrameClient* frameClient)
+void WebViewImpl::initializeMainFrame(WebFrame* frame)
{
// NOTE: The WebFrameImpl takes a reference to itself within InitMainFrame
// and releases that reference once the corresponding Frame is destroyed.
- RefPtr<WebFrameImpl> frame = WebFrameImpl::create(frameClient);
-
- frame->initializeAsMainFrame(page());
-}
-
-void WebViewImpl::initializeHelperPluginFrame(WebFrameClient* client)
-{
- RefPtr<WebFrameImpl> frame = WebFrameImpl::create(client);
+ static_cast<WebFrameImpl*>(frame)->initializeAsMainFrame(page());
}
void WebViewImpl::setAutofillClient(WebAutofillClient* autofillClient)

Powered by Google App Engine
This is Rietveld 408576698