window_->SetDocumentEdited(edited);
}
+bool Window::IsDocumentEdited() {
+ return window_->IsDocumentEdited();
+}
+
mate::Handle<WebContents> Window::GetWebContents(v8::Isolate* isolate) const {
return WebContents::Create(isolate, window_->GetWebContents());
}
.SetMethod("setRepresentedFilename", &Window::SetRepresentedFilename)
.SetMethod("getRepresentedFilename", &Window::GetRepresentedFilename)
.SetMethod("setDocumentEdited", &Window::SetDocumentEdited)
+ .SetMethod("IsDocumentEdited", &Window::IsDocumentEdited)
.SetMethod("_openDevTools", &Window::OpenDevTools)
.SetMethod("closeDevTools", &Window::CloseDevTools)
.SetMethod("isDevToolsOpened", &Window::IsDevToolsOpened)
void SetRepresentedFilename(const std::string& filename);
std::string GetRepresentedFilename();
void SetDocumentEdited(bool edited);
+ bool IsDocumentEdited();
// APIs for WebContents.
mate::Handle<WebContents> GetWebContents(v8::Isolate* isolate) const;
void NativeWindow::SetMenu(ui::MenuModel* menu) {
}
+bool NativeWindow::IsDocumentEdited() {
+ return false;
+}
+
bool NativeWindow::HasModalDialog() {
return has_dialog_attached_;
}
virtual std::string GetRepresentedFilename();
virtual void SetDocumentEdited(bool edited);
virtual void SetMenu(ui::MenuModel* menu);
+ virtual bool IsDocumentEdited();
virtual bool HasModalDialog();
virtual gfx::NativeWindow GetNativeWindow() = 0;
virtual void SetRepresentedFilename(const std::string& filename) OVERRIDE;
virtual std::string GetRepresentedFilename() OVERRIDE;
virtual void SetDocumentEdited(bool edited) OVERRIDE;
+ virtual bool IsDocumentEdited() OVERRIDE;
virtual bool HasModalDialog() OVERRIDE;
virtual gfx::NativeWindow GetNativeWindow() OVERRIDE;
[window_ setDocumentEdited:edited];
}
+bool NativeWindowMac::IsDocumentEdited() {
+ return [window_ isDocumentEdited];
+}
+
bool NativeWindowMac::HasModalDialog() {
return [window_ attachedSheet] != nil;
}
__OS X Only:__ Specifies whether the window’s document has been edited, and the
icon in titlebar will become grey when set to `true`.
+### BrowserWindow.IsDocumentEdited()
+
+__OS X Only:__ Whether the window's document has been edited.
+
### BrowserWindow.openDevTools()
Opens the developer tools.