Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3511)

Unified Diff: chrome/renderer/chrome_mock_render_thread.cc

Issue 9705084: Block printing from blocked popup. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix init order Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/renderer/chrome_mock_render_thread.h ('k') | chrome/renderer/mock_printer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/chrome_mock_render_thread.cc
diff --git a/chrome/renderer/chrome_mock_render_thread.cc b/chrome/renderer/chrome_mock_render_thread.cc
index d3abcab50fd151bb7a5549b06e6a77f1f9331e53..a3b3e2e19fe0550a073558e672fdd2fafe204cf8 100644
--- a/chrome/renderer/chrome_mock_render_thread.cc
+++ b/chrome/renderer/chrome_mock_render_thread.cc
@@ -40,6 +40,8 @@ bool ChromeMockRenderThread::OnMessageReceived(const IPC::Message& msg) {
OnMsgOpenChannelToExtension)
IPC_MESSAGE_HANDLER(PrintHostMsg_GetDefaultPrintSettings,
OnGetDefaultPrintSettings)
+ IPC_MESSAGE_HANDLER(PrintHostMsg_CheckScriptedPrintAllowed,
+ OnCheckScriptedPrintAllowed)
IPC_MESSAGE_HANDLER(PrintHostMsg_ScriptedPrint, OnScriptedPrint)
IPC_MESSAGE_HANDLER(PrintHostMsg_UpdatePrintSettings, OnUpdatePrintSettings)
IPC_MESSAGE_HANDLER(PrintHostMsg_DidGetPrintedPagesCount,
@@ -96,6 +98,11 @@ void ChromeMockRenderThread::OnGetDefaultPrintSettings(
printer_->GetDefaultPrintSettings(params);
}
+void ChromeMockRenderThread::OnCheckScriptedPrintAllowed(bool* allowed) {
+ if (printer_.get())
+ printer_->OnCheckScriptedPrintAllowed(allowed);
+}
+
void ChromeMockRenderThread::OnScriptedPrint(
const PrintHostMsg_ScriptedPrint_Params& params,
PrintMsg_PrintPages_Params* settings) {
« no previous file with comments | « chrome/renderer/chrome_mock_render_thread.h ('k') | chrome/renderer/mock_printer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698