window_->SetRepresentedFilename(filename);
}
+std::string Window::GetRepresentedFilename() {
+ return window_->GetRepresentedFilename();
+}
+
void Window::SetDocumentEdited(bool edited) {
window_->SetDocumentEdited(edited);
}
.SetMethod("setKiosk", &Window::SetKiosk)
.SetMethod("isKiosk", &Window::IsKiosk)
.SetMethod("setRepresentedFilename", &Window::SetRepresentedFilename)
+ .SetMethod("getRepresentedFilename", &Window::GetRepresentedFilename)
.SetMethod("setDocumentEdited", &Window::SetDocumentEdited)
.SetMethod("_openDevTools", &Window::OpenDevTools)
.SetMethod("closeDevTools", &Window::CloseDevTools)
bool IsWebViewFocused();
void CapturePage(mate::Arguments* args);
void SetRepresentedFilename(const std::string& filename);
+ std::string GetRepresentedFilename();
void SetDocumentEdited(bool edited);
// APIs for WebContents.
void NativeWindow::SetRepresentedFilename(const std::string& filename) {
}
+std::string NativeWindow::GetRepresentedFilename() {
+ return "";
+}
+
void NativeWindow::SetDocumentEdited(bool edited) {
}
virtual void SetKiosk(bool kiosk) = 0;
virtual bool IsKiosk() = 0;
virtual void SetRepresentedFilename(const std::string& filename);
+ virtual std::string GetRepresentedFilename();
virtual void SetDocumentEdited(bool edited);
virtual void SetMenu(ui::MenuModel* menu);
virtual bool HasModalDialog();
virtual void SetKiosk(bool kiosk) OVERRIDE;
virtual bool IsKiosk() OVERRIDE;
virtual void SetRepresentedFilename(const std::string& filename) OVERRIDE;
+ virtual std::string GetRepresentedFilename() OVERRIDE;
virtual void SetDocumentEdited(bool edited) OVERRIDE;
virtual bool HasModalDialog() OVERRIDE;
virtual gfx::NativeWindow GetNativeWindow() OVERRIDE;
[window_ setRepresentedFilename:base::SysUTF8ToNSString(filename)];
}
+std::string NativeWindowMac::GetRepresentedFilename() {
+ return base::SysNSStringToUTF8([window_ representedFilename]);
+}
+
void NativeWindowMac::SetDocumentEdited(bool edited) {
[window_ setDocumentEdited:edited];
}
__OS X Only:__ Sets the pathname of the file the window represents, and the icon
of the file will show in window's title bar.
+### BrowserWindow.getRepresentedFilename()
+
+__OS X Only:__ Returns the pathname of the file the window represents.
+
### BrowserWindow.setDocumentEdited(edited)
* `edited` Boolean