mac: Add APIs on setting icon in titlebar.

This commit is contained in:
Cheng Zhao 2014-05-27 14:15:34 +08:00
parent 2f5dfb1dc7
commit a7b730654c
7 changed files with 44 additions and 0 deletions

View file

@ -314,6 +314,14 @@ void Window::CapturePage(mate::Arguments* args) {
window_->CapturePage(rect, base::Bind(&OnCapturePageDone, callback));
}
void Window::SetRepresentedFilename(const std::string& filename) {
window_->SetRepresentedFilename(filename);
}
void Window::SetDocumentEdited(bool edited) {
window_->SetDocumentEdited(edited);
}
mate::Handle<WebContents> Window::GetWebContents(v8::Isolate* isolate) const {
return WebContents::Create(isolate, window_->GetWebContents());
}
@ -360,6 +368,8 @@ void Window::BuildPrototype(v8::Isolate* isolate,
.SetMethod("flashFrame", &Window::FlashFrame)
.SetMethod("setKiosk", &Window::SetKiosk)
.SetMethod("isKiosk", &Window::IsKiosk)
.SetMethod("setRepresentedFilename", &Window::SetRepresentedFilename)
.SetMethod("setDocumentEdited", &Window::SetDocumentEdited)
.SetMethod("_openDevTools", &Window::OpenDevTools)
.SetMethod("closeDevTools", &Window::CloseDevTools)
.SetMethod("isDevToolsOpened", &Window::IsDevToolsOpened)

View file

@ -101,6 +101,8 @@ class Window : public mate::EventEmitter,
void BlurWebView();
bool IsWebViewFocused();
void CapturePage(mate::Arguments* args);
void SetRepresentedFilename(const std::string& filename);
void SetDocumentEdited(bool edited);
// APIs for WebContents.
mate::Handle<WebContents> GetWebContents(v8::Isolate* isolate) const;