- Add window.print() JavaScript support.

- Add File -> Print option to cefclient.

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@89 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt
2010-07-20 13:28:44 +00:00
parent 0e29c2e840
commit 38ded6eec6
5 changed files with 16 additions and 2 deletions

View File

@@ -920,6 +920,10 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
::SetFocus(hFindDlg);
}
return 0;
case ID_PRINT:
if(browser.get())
browser->GetMainFrame()->Print();
return 0;
case IDC_NAV_BACK: // Back button
if(browser.get())
browser->GoBack();

View File

@@ -51,9 +51,11 @@ IDC_CEFCLIENT MENU
BEGIN
POPUP "&File"
BEGIN
MENUITEM "E&xit", IDM_EXIT
MENUITEM SEPARATOR
MENUITEM "&Find...", ID_FIND
MENUITEM SEPARATOR
MENUITEM "&Print...", ID_PRINT
MENUITEM SEPARATOR
MENUITEM "E&xit", IDM_EXIT
END
POPUP "&Help"
BEGIN

View File

@@ -23,6 +23,7 @@
#define IDC_NAV_STOP 203
#define ID_WARN_CONSOLEMESSAGE 32000
#define ID_FIND 32001
#define ID_PRINT 32002
#define ID_TESTS_GETSOURCE 32769
#define ID_TESTS_GETTEXT 32770
#define ID_TESTS_JAVASCRIPT_HANDLER 32771