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

Unified Diff: third_party/WebKit/Source/web/WebViewImpl.cpp

Issue 1467123003: Create base class for common functionality of Web{Local,Remote}Frame (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: --no-find-copies Created 5 years, 1 month 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: third_party/WebKit/Source/web/WebViewImpl.cpp
diff --git a/third_party/WebKit/Source/web/WebViewImpl.cpp b/third_party/WebKit/Source/web/WebViewImpl.cpp
index 93970bcf2568715ff4ad554638446abf373f1a35..fb4e60aa8b673446f732bf97a86800bd3b3e4f6d 100644
--- a/third_party/WebKit/Source/web/WebViewImpl.cpp
+++ b/third_party/WebKit/Source/web/WebViewImpl.cpp
@@ -367,12 +367,7 @@ void WebView::didExitModalLoop()
void WebViewImpl::setMainFrame(WebFrame* frame)
{
- if (frame->isWebLocalFrame()) {
- WebLocalFrameImpl* localFrame = toWebLocalFrameImpl(frame);
- localFrame->initializeCoreFrame(&page()->frameHost(), 0, nullAtom, nullAtom);
- } else {
- toWebRemoteFrameImpl(frame)->initializeCoreFrame(&page()->frameHost(), 0, nullAtom);
- }
+ frame->toImplBase()->initializeCoreFrame(&page()->frameHost(), 0, nullAtom, nullAtom);
}
void WebViewImpl::setCredentialManagerClient(WebCredentialManagerClient* webCredentialManagerClient)
@@ -2810,7 +2805,7 @@ void WebViewImpl::setFocusedFrame(WebFrame* frame)
void WebViewImpl::focusDocumentView(WebFrame* frame)
{
- page()->focusController().focusDocumentView(toCoreFrame(frame));
+ page()->focusController().focusDocumentView(frame->toImplBase()->frame());
}
void WebViewImpl::setInitialFocus(bool reverse)

Powered by Google App Engine
This is Rietveld 408576698