Store NativeWindow in weak ptr
This commit is contained in:
parent
19ca011735
commit
4b61683cdf
2 changed files with 10 additions and 9 deletions
|
@ -44,6 +44,8 @@ class CommonWebContentsDelegate
|
|||
return web_contents_.get();
|
||||
}
|
||||
|
||||
NativeWindow* owner_window() const { return owner_window_.get(); }
|
||||
|
||||
protected:
|
||||
// content::WebContentsDelegate:
|
||||
content::WebContents* OpenURLFromTab(
|
||||
|
@ -90,7 +92,7 @@ class CommonWebContentsDelegate
|
|||
void SetHtmlApiFullscreen(bool enter_fullscreen);
|
||||
|
||||
// The window that this WebContents belongs to.
|
||||
NativeWindow* owner_window_;
|
||||
base::WeakPtr<NativeWindow> owner_window_;
|
||||
|
||||
// Whether window is fullscreened by HTML5 api.
|
||||
bool html_fullscreen_;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue