mac: Add BrowserWindow.getRepresentedFilename API, fixes #460.
This commit is contained in:
parent
301706b7d6
commit
acb8b7771e
7 changed files with 20 additions and 0 deletions
|
@ -320,6 +320,10 @@ void Window::SetRepresentedFilename(const std::string& filename) {
|
|||
window_->SetRepresentedFilename(filename);
|
||||
}
|
||||
|
||||
std::string Window::GetRepresentedFilename() {
|
||||
return window_->GetRepresentedFilename();
|
||||
}
|
||||
|
||||
void Window::SetDocumentEdited(bool edited) {
|
||||
window_->SetDocumentEdited(edited);
|
||||
}
|
||||
|
@ -373,6 +377,7 @@ void Window::BuildPrototype(v8::Isolate* isolate,
|
|||
.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)
|
||||
|
|
|
@ -98,6 +98,7 @@ class Window : public mate::EventEmitter,
|
|||
bool IsWebViewFocused();
|
||||
void CapturePage(mate::Arguments* args);
|
||||
void SetRepresentedFilename(const std::string& filename);
|
||||
std::string GetRepresentedFilename();
|
||||
void SetDocumentEdited(bool edited);
|
||||
|
||||
// APIs for WebContents.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue