Merge pull request #493 from hokein/issue460

mac: Add BrowserWindow.getRepresentedFilename API, fixes #460.
This commit is contained in:
Cheng Zhao 2014-07-24 21:10:43 +08:00
commit 99ef165884
7 changed files with 40 additions and 0 deletions

View file

@ -461,10 +461,18 @@ void NativeWindowMac::SetRepresentedFilename(const std::string& filename) {
[window_ setRepresentedFilename:base::SysUTF8ToNSString(filename)];
}
std::string NativeWindowMac::GetRepresentedFilename() {
return base::SysNSStringToUTF8([window_ representedFilename]);
}
void NativeWindowMac::SetDocumentEdited(bool edited) {
[window_ setDocumentEdited:edited];
}
bool NativeWindowMac::IsDocumentEdited() {
return [window_ isDocumentEdited];
}
bool NativeWindowMac::HasModalDialog() {
return [window_ attachedSheet] != nil;
}