Move webContents events away from window.
This commit is contained in:
parent
9eeec9aa0b
commit
859606e88c
8 changed files with 34 additions and 51 deletions
|
@ -23,7 +23,22 @@ WebContents::WebContents(content::WebContents* web_contents)
|
|||
WebContents::~WebContents() {
|
||||
}
|
||||
|
||||
void WebContents::RenderViewDeleted(content::RenderViewHost*) {
|
||||
base::ListValue args;
|
||||
args.AppendInteger(GetProcessID());
|
||||
args.AppendInteger(GetRoutingID());
|
||||
Emit("render-view-deleted", args);
|
||||
}
|
||||
|
||||
void WebContents::RenderProcessGone(base::TerminationStatus status) {
|
||||
Emit("crashed");
|
||||
}
|
||||
|
||||
void WebContents::WebContentsDestroyed(content::WebContents*) {
|
||||
// The RenderViewDeleted is not called when the WebContents is destroyed
|
||||
// directly.
|
||||
RenderViewDeleted(web_contents_->GetRenderViewHost());
|
||||
|
||||
web_contents_ = NULL;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue