mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Add support for printing via CefBrowserHost::Print() and JavaScript window.print() (issue #505).
git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1479 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
@ -149,6 +149,14 @@ gboolean EndTracingActivated(GtkWidget* widget) {
|
||||
return FALSE; // Don't stop this message.
|
||||
}
|
||||
|
||||
// Callback for Tests > Print menu item.
|
||||
gboolean PrintActivated(GtkWidget* widget) {
|
||||
if (g_handler.get())
|
||||
g_handler->GetBrowser()->GetHost()->Print();
|
||||
|
||||
return FALSE; // Don't stop this message.
|
||||
}
|
||||
|
||||
// Callback for Tests > Other Tests... menu item.
|
||||
gboolean OtherTestsActivated(GtkWidget* widget) {
|
||||
if (g_handler.get() && g_handler->GetBrowserId())
|
||||
@ -232,6 +240,8 @@ GtkWidget* CreateMenuBar() {
|
||||
G_CALLBACK(BeginTracingActivated));
|
||||
AddMenuEntry(debug_menu, "End Tracing",
|
||||
G_CALLBACK(EndTracingActivated));
|
||||
AddMenuEntry(debug_menu, "Print",
|
||||
G_CALLBACK(PrintActivated));
|
||||
AddMenuEntry(debug_menu, "Other Tests",
|
||||
G_CALLBACK(OtherTestsActivated));
|
||||
return menu_bar;
|
||||
|
Reference in New Issue
Block a user