🎁 Add 'win.closeFilePreview()'

This commit is contained in:
Daniel Pham 2016-11-21 13:30:13 -05:00 committed by Kevin Sawicki
parent ccabee764b
commit d5a0dd39a1
7 changed files with 23 additions and 0 deletions

View file

@ -736,6 +736,10 @@ void Window::PreviewFile(const std::string& path, mate::Arguments* args) {
window_->PreviewFile(path, display_name);
}
void Window::CloseFilePreview() {
window_->CloseFilePreview();
}
void Window::SetParentWindow(v8::Local<v8::Value> value,
mate::Arguments* args) {
if (IsModal()) {
@ -840,6 +844,7 @@ void Window::BuildPrototype(v8::Isolate* isolate,
.SetMethod("isFullScreen", &Window::IsFullscreen)
.SetMethod("setAspectRatio", &Window::SetAspectRatio)
.SetMethod("previewFile", &Window::PreviewFile)
.SetMethod("closeFilePreview", &Window::CloseFilePreview)
#if !defined(OS_WIN)
.SetMethod("setParentWindow", &Window::SetParentWindow)
#endif