A normal WebContents can have no owner window
This commit is contained in:
parent
118afab67b
commit
8a061b7183
1 changed files with 3 additions and 3 deletions
|
@ -379,7 +379,7 @@ void WebContents::MoveContents(content::WebContents* source,
|
|||
|
||||
void WebContents::CloseContents(content::WebContents* source) {
|
||||
Emit("close");
|
||||
if (type_ == BROWSER_WINDOW)
|
||||
if (type_ == BROWSER_WINDOW && owner_window())
|
||||
owner_window()->CloseContents(source);
|
||||
}
|
||||
|
||||
|
@ -430,13 +430,13 @@ void WebContents::ExitFullscreenModeForTab(content::WebContents* source) {
|
|||
|
||||
void WebContents::RendererUnresponsive(content::WebContents* source) {
|
||||
Emit("unresponsive");
|
||||
if (type_ == BROWSER_WINDOW)
|
||||
if (type_ == BROWSER_WINDOW && owner_window())
|
||||
owner_window()->RendererUnresponsive(source);
|
||||
}
|
||||
|
||||
void WebContents::RendererResponsive(content::WebContents* source) {
|
||||
Emit("responsive");
|
||||
if (type_ == BROWSER_WINDOW)
|
||||
if (type_ == BROWSER_WINDOW && owner_window())
|
||||
owner_window()->RendererResponsive(source);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue