Store the devtools window in weak pointer.
This commit is contained in:
parent
391468ece0
commit
6bd0b82b2e
2 changed files with 19 additions and 5 deletions
|
@ -153,6 +153,10 @@ class NativeWindow : public brightray::DefaultWebContentsDelegate,
|
|||
// Should be called by platform code when user want to close the window.
|
||||
virtual void CloseWebContents();
|
||||
|
||||
base::WeakPtr<NativeWindow> GetWeakPtr() {
|
||||
return weak_factory_.GetWeakPtr();
|
||||
}
|
||||
|
||||
content::WebContents* GetWebContents() const;
|
||||
content::WebContents* GetDevToolsWebContents() const;
|
||||
|
||||
|
@ -267,6 +271,8 @@ class NativeWindow : public brightray::DefaultWebContentsDelegate,
|
|||
|
||||
base::WeakPtrFactory<NativeWindow> weak_factory_;
|
||||
|
||||
base::WeakPtr<NativeWindow> devtools_window_;
|
||||
|
||||
scoped_ptr<DevToolsDelegate> devtools_delegate_;
|
||||
scoped_ptr<AtomJavaScriptDialogManager> dialog_manager_;
|
||||
scoped_ptr<brightray::InspectableWebContents> inspectable_web_contents_;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue