| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/printing/print_preview_message_handler.h" | 5 #include "chrome/browser/printing/print_preview_message_handler.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 | 199 |
| 200 void PrintPreviewMessageHandler::OnSetOptionsFromDocument( | 200 void PrintPreviewMessageHandler::OnSetOptionsFromDocument( |
| 201 const PrintHostMsg_SetOptionsFromDocument_Params& params) { | 201 const PrintHostMsg_SetOptionsFromDocument_Params& params) { |
| 202 PrintPreviewUI* print_preview_ui = GetPrintPreviewUI(); | 202 PrintPreviewUI* print_preview_ui = GetPrintPreviewUI(); |
| 203 if (!print_preview_ui) | 203 if (!print_preview_ui) |
| 204 return; | 204 return; |
| 205 print_preview_ui->OnSetOptionsFromDocument(params); | 205 print_preview_ui->OnSetOptionsFromDocument(params); |
| 206 } | 206 } |
| 207 | 207 |
| 208 bool PrintPreviewMessageHandler::OnMessageReceived( | 208 bool PrintPreviewMessageHandler::OnMessageReceived( |
| 209 const IPC::Message& message, | 209 const IPC::Message& message) { |
| 210 content::RenderFrameHost* render_frame_host) { | |
| 211 bool handled = true; | 210 bool handled = true; |
| 212 IPC_BEGIN_MESSAGE_MAP(PrintPreviewMessageHandler, message) | 211 IPC_BEGIN_MESSAGE_MAP(PrintPreviewMessageHandler, message) |
| 213 IPC_MESSAGE_HANDLER(PrintHostMsg_RequestPrintPreview, | 212 IPC_MESSAGE_HANDLER(PrintHostMsg_RequestPrintPreview, |
| 214 OnRequestPrintPreview) | 213 OnRequestPrintPreview) |
| 215 IPC_MESSAGE_HANDLER(PrintHostMsg_DidGetPreviewPageCount, | 214 IPC_MESSAGE_HANDLER(PrintHostMsg_DidGetPreviewPageCount, |
| 216 OnDidGetPreviewPageCount) | 215 OnDidGetPreviewPageCount) |
| 217 IPC_MESSAGE_HANDLER(PrintHostMsg_DidPreviewPage, | 216 IPC_MESSAGE_HANDLER(PrintHostMsg_DidPreviewPage, |
| 218 OnDidPreviewPage) | 217 OnDidPreviewPage) |
| 219 IPC_MESSAGE_HANDLER(PrintHostMsg_MetafileReadyForPrinting, | 218 IPC_MESSAGE_HANDLER(PrintHostMsg_MetafileReadyForPrinting, |
| 220 OnMetafileReadyForPrinting) | 219 OnMetafileReadyForPrinting) |
| 221 IPC_MESSAGE_HANDLER(PrintHostMsg_PrintPreviewFailed, | 220 IPC_MESSAGE_HANDLER(PrintHostMsg_PrintPreviewFailed, |
| 222 OnPrintPreviewFailed) | 221 OnPrintPreviewFailed) |
| 223 IPC_MESSAGE_HANDLER(PrintHostMsg_DidGetDefaultPageLayout, | 222 IPC_MESSAGE_HANDLER(PrintHostMsg_DidGetDefaultPageLayout, |
| 224 OnDidGetDefaultPageLayout) | 223 OnDidGetDefaultPageLayout) |
| 225 IPC_MESSAGE_HANDLER(PrintHostMsg_PrintPreviewCancelled, | 224 IPC_MESSAGE_HANDLER(PrintHostMsg_PrintPreviewCancelled, |
| 226 OnPrintPreviewCancelled) | 225 OnPrintPreviewCancelled) |
| 227 IPC_MESSAGE_HANDLER(PrintHostMsg_PrintPreviewInvalidPrinterSettings, | 226 IPC_MESSAGE_HANDLER(PrintHostMsg_PrintPreviewInvalidPrinterSettings, |
| 228 OnInvalidPrinterSettings) | 227 OnInvalidPrinterSettings) |
| 229 IPC_MESSAGE_HANDLER(PrintHostMsg_SetOptionsFromDocument, | 228 IPC_MESSAGE_HANDLER(PrintHostMsg_SetOptionsFromDocument, |
| 230 OnSetOptionsFromDocument) | 229 OnSetOptionsFromDocument) |
| 231 IPC_MESSAGE_UNHANDLED(handled = false) | 230 IPC_MESSAGE_UNHANDLED(handled = false) |
| 232 IPC_END_MESSAGE_MAP() | 231 IPC_END_MESSAGE_MAP() |
| 233 return handled; | 232 return handled; |
| 234 } | 233 } |
| 235 | 234 |
| 236 } // namespace printing | 235 } // namespace printing |
| OLD | NEW |