v8::Local<v8::ObjectTemplate> prototype) {
mate::ObjectTemplateBuilder(isolate, prototype)
.SetMethod("destroy", &Tray::Destroy, true)
+ .SetMethod("isDestroyed", &Tray::IsDestroyed, true)
.SetMethod("setImage", &Tray::SetImage)
.SetMethod("setPressedImage", &Tray::SetPressedImage)
.SetMethod("setToolTip", &Tray::SetToolTip)
}
}
-bool WebContents::IsAlive() const {
- return web_contents() != NULL;
-}
-
int WebContents::GetID() const {
return web_contents()->GetRenderProcessHost()->GetID();
}
if (template_.IsEmpty())
template_.Reset(isolate, mate::ObjectTemplateBuilder(isolate)
.SetMethod("destroy", &WebContents::Destroy, true)
- .SetMethod("isAlive", &WebContents::IsAlive, true)
+ .SetMethod("isDestroyed", &WebContents::IsDestroyed, true)
.SetMethod("getId", &WebContents::GetID)
.SetMethod("equal", &WebContents::Equal)
.SetMethod("_loadURL", &WebContents::LoadURL)
}
bool WebContents::IsDestroyed() const {
- return !IsAlive();
+ return !web_contents();
}
AtomBrowserContext* WebContents::GetBrowserContext() const {
// mate::TrackableObject:
void Destroy() override;
- bool IsAlive() const;
int GetID() const;
bool Equal(const WebContents* web_contents) const;
void LoadURL(const GURL& url, const mate::Dictionary& options);
window_->Close();
}
-bool Window::IsClosed() {
- return window_->IsClosed();
-}
-
void Window::Focus() {
window_->Focus(true);
}
v8::Local<v8::ObjectTemplate> prototype) {
mate::ObjectTemplateBuilder(isolate, prototype)
.SetMethod("destroy", &Window::Destroy, true)
+ .SetMethod("isDestroyed", &Window::IsDestroyed, true)
.SetMethod("close", &Window::Close)
- .SetMethod("isClosed", &Window::IsClosed)
.SetMethod("focus", &Window::Focus)
.SetMethod("isFocused", &Window::IsFocused)
.SetMethod("show", &Window::Show)
// APIs for NativeWindow.
void Close();
- bool IsClosed();
void Focus();
bool IsFocused();
void Show();