Add BrowserWindow.print() method.

This commit is contained in:
Cheng Zhao 2014-08-21 21:00:49 +08:00
parent 87d5b72b76
commit 11b9a06639
4 changed files with 33 additions and 19 deletions

View file

@ -136,8 +136,8 @@ class NativeWindow : public brightray::DefaultWebContentsDelegate,
virtual void SetRepresentedFilename(const std::string& filename);
virtual std::string GetRepresentedFilename();
virtual void SetDocumentEdited(bool edited);
virtual void SetMenu(ui::MenuModel* menu);
virtual bool IsDocumentEdited();
virtual void SetMenu(ui::MenuModel* menu);
virtual bool HasModalDialog();
virtual gfx::NativeWindow GetNativeWindow() = 0;
@ -156,6 +156,9 @@ class NativeWindow : public brightray::DefaultWebContentsDelegate,
virtual void CapturePage(const gfx::Rect& rect,
const CapturePageCallback& callback);
// Print current page.
virtual void Print();
// The same with closing a tab in a real browser.
//
// Should be called by platform code when user want to close the window.