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 3d69245549d92863a3d115277446ca7d00dafaa7..91dd171107f98c8d3530853a917604bc246260c8 100644 |
--- a/third_party/WebKit/Source/web/WebViewImpl.cpp |
+++ b/third_party/WebKit/Source/web/WebViewImpl.cpp |
@@ -269,14 +269,17 @@ class ColorOverlay final : public PageOverlay::Delegate { |
// WebView ---------------------------------------------------------------- |
WebView* WebView::Create(WebViewClient* client, |
- WebPageVisibilityState visibility_state) { |
- return WebViewImpl::Create(client, visibility_state); |
+ WebPageVisibilityState visibility_state, |
+ WebView* opener) { |
+ return WebViewImpl::Create(client, visibility_state, |
+ static_cast<WebViewImpl*>(opener)); |
} |
WebViewBase* WebViewImpl::Create(WebViewClient* client, |
- WebPageVisibilityState visibility_state) { |
+ WebPageVisibilityState visibility_state, |
+ WebViewImpl* opener) { |
// Pass the WebViewImpl's self-reference to the caller. |
- return AdoptRef(new WebViewImpl(client, visibility_state)).LeakRef(); |
+ return AdoptRef(new WebViewImpl(client, visibility_state, opener)).LeakRef(); |
} |
const WebInputEvent* WebViewBase::CurrentInputEvent() { |
@@ -333,7 +336,8 @@ HashSet<WebViewBase*>& WebViewBase::AllInstances() { |
} |
WebViewImpl::WebViewImpl(WebViewClient* client, |
- WebPageVisibilityState visibility_state) |
+ WebPageVisibilityState visibility_state, |
+ WebViewImpl* opener) |
: client_(client), |
spell_check_client_(nullptr), |
chrome_client_(WebFactory::GetInstance().CreateChromeClient(this)), |
@@ -390,7 +394,8 @@ WebViewImpl::WebViewImpl(WebViewClient* client, |
page_clients.editor_client = &editor_client_impl_; |
page_clients.spell_checker_client = &spell_checker_client_impl_; |
- page_ = Page::CreateOrdinary(page_clients); |
+ page_ = |
+ Page::CreateOrdinary(page_clients, opener ? opener->GetPage() : nullptr); |
MediaKeysController::ProvideMediaKeysTo(*page_, &media_keys_client_impl_); |
ProvideSpeechRecognitionTo( |
*page_, SpeechRecognitionClientProxy::Create( |