api: Add webContent.create() to create detached WebContents

This commit is contained in:
Cheng Zhao 2014-10-23 14:04:13 +08:00
parent c72d769ff0
commit d34cff2eef
5 changed files with 78 additions and 9 deletions

View file

@ -375,12 +375,12 @@ void Window::SetProgressBar(double progress) {
}
mate::Handle<WebContents> Window::GetWebContents(v8::Isolate* isolate) const {
return WebContents::Create(isolate, window_->GetWebContents());
return WebContents::CreateFrom(isolate, window_->GetWebContents());
}
mate::Handle<WebContents> Window::GetDevToolsWebContents(
v8::Isolate* isolate) const {
return WebContents::Create(isolate, window_->GetDevToolsWebContents());
return WebContents::CreateFrom(isolate, window_->GetDevToolsWebContents());
}
// static