Store NativeWindow's weak ptr in WebContents
This commit is contained in:
parent
2532318bee
commit
2bfa9da82e
5 changed files with 33 additions and 6 deletions
|
@ -123,6 +123,9 @@ void CommonWebContentsDelegate::InitWithWebContents(
|
|||
owner_window_ = owner_window;
|
||||
web_contents->SetDelegate(this);
|
||||
|
||||
NativeWindowRelay* relay = new NativeWindowRelay(owner_window_->GetWeakPtr());
|
||||
web_contents->SetUserData(relay->key, relay);
|
||||
|
||||
printing::PrintViewManagerBasic::CreateForWebContents(web_contents);
|
||||
printing::PrintPreviewMessageHandler::CreateForWebContents(web_contents);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue