| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #ifndef CHROME_BROWSER_PRINTING_PRINT_PREVIEW_MESSAGE_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_PRINTING_PRINT_PREVIEW_MESSAGE_HANDLER_H_ |
| 6 #define CHROME_BROWSER_PRINTING_PRINT_PREVIEW_MESSAGE_HANDLER_H_ | 6 #define CHROME_BROWSER_PRINTING_PRINT_PREVIEW_MESSAGE_HANDLER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "content/browser/tab_contents/tab_contents_observer.h" | 10 #include "content/browser/tab_contents/tab_contents_observer.h" |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 TabContentsWrapper* GetPrintPreviewTab(); | 36 TabContentsWrapper* GetPrintPreviewTab(); |
| 37 | 37 |
| 38 // Helper function to return the TabContentsWrapper for tab_contents(). | 38 // Helper function to return the TabContentsWrapper for tab_contents(). |
| 39 TabContentsWrapper* tab_contents_wrapper(); | 39 TabContentsWrapper* tab_contents_wrapper(); |
| 40 | 40 |
| 41 // Common code between failure handlers. Returns a PrintPreviewUI* if there | 41 // Common code between failure handlers. Returns a PrintPreviewUI* if there |
| 42 // exists a PrintPreviewUI to send messages to. | 42 // exists a PrintPreviewUI to send messages to. |
| 43 PrintPreviewUI* OnFailure(int document_cookie); | 43 PrintPreviewUI* OnFailure(int document_cookie); |
| 44 | 44 |
| 45 // Message handlers. | 45 // Message handlers. |
| 46 void OnRequestPrintPreview(); | 46 void OnRequestPrintPreview(bool source_is_modifiable); |
| 47 void OnDidGetDefaultPageLayout( | 47 void OnDidGetDefaultPageLayout( |
| 48 const printing::PageSizeMargins& page_layout_in_points); | 48 const printing::PageSizeMargins& page_layout_in_points); |
| 49 void OnDidGetPreviewPageCount( | 49 void OnDidGetPreviewPageCount( |
| 50 const PrintHostMsg_DidGetPreviewPageCount_Params& params); | 50 const PrintHostMsg_DidGetPreviewPageCount_Params& params); |
| 51 void OnDidPreviewPage(const PrintHostMsg_DidPreviewPage_Params& params); | 51 void OnDidPreviewPage(const PrintHostMsg_DidPreviewPage_Params& params); |
| 52 void OnMetafileReadyForPrinting( | 52 void OnMetafileReadyForPrinting( |
| 53 const PrintHostMsg_DidPreviewDocument_Params& params); | 53 const PrintHostMsg_DidPreviewDocument_Params& params); |
| 54 void OnPrintPreviewFailed(int document_cookie); | 54 void OnPrintPreviewFailed(int document_cookie); |
| 55 void OnPrintPreviewCancelled(int document_cookie); | 55 void OnPrintPreviewCancelled(int document_cookie); |
| 56 void OnInvalidPrinterSettings(int document_cookie); | 56 void OnInvalidPrinterSettings(int document_cookie); |
| 57 | 57 |
| 58 DISALLOW_COPY_AND_ASSIGN(PrintPreviewMessageHandler); | 58 DISALLOW_COPY_AND_ASSIGN(PrintPreviewMessageHandler); |
| 59 }; | 59 }; |
| 60 | 60 |
| 61 } // namespace printing | 61 } // namespace printing |
| 62 | 62 |
| 63 #endif // CHROME_BROWSER_PRINTING_PRINT_PREVIEW_MESSAGE_HANDLER_H_ | 63 #endif // CHROME_BROWSER_PRINTING_PRINT_PREVIEW_MESSAGE_HANDLER_H_ |
| OLD | NEW |