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 "content/browser/tab_contents/tab_contents_observer.h" | 9 #include "content/browser/tab_contents/tab_contents_observer.h" |
10 | 10 |
(...skipping 12 matching lines...) Expand all Loading... |
23 // TabContentsObserver implementation. | 23 // TabContentsObserver implementation. |
24 virtual bool OnMessageReceived(const IPC::Message& message); | 24 virtual bool OnMessageReceived(const IPC::Message& message); |
25 virtual void DidStartLoading(); | 25 virtual void DidStartLoading(); |
26 | 26 |
27 private: | 27 private: |
28 // Gets the print preview tab associated with |owner_|. | 28 // Gets the print preview tab associated with |owner_|. |
29 TabContents* GetPrintPreviewTab(); | 29 TabContents* GetPrintPreviewTab(); |
30 | 30 |
31 // Message handlers. | 31 // Message handlers. |
32 void OnRequestPrintPreview(); | 32 void OnRequestPrintPreview(); |
33 void OnDidGetPreviewPageCount(int page_count); | 33 void OnDidGetPreviewPageCount(int document_cookie, int page_count); |
34 // |page_number| is 0-based. | 34 // |page_number| is 0-based. |
35 void OnDidPreviewPage(int page_number, bool* cancel); | 35 void OnDidPreviewPage(int page_number); |
36 void OnPagesReadyForPreview( | 36 void OnPagesReadyForPreview( |
37 const PrintHostMsg_DidPreviewDocument_Params& params); | 37 const PrintHostMsg_DidPreviewDocument_Params& params); |
38 void OnPrintPreviewFailed(int document_cookie); | 38 void OnPrintPreviewFailed(int document_cookie); |
39 void OnPrintPreviewCancelled(int document_cookie); | |
40 | 39 |
41 DISALLOW_COPY_AND_ASSIGN(PrintPreviewMessageHandler); | 40 DISALLOW_COPY_AND_ASSIGN(PrintPreviewMessageHandler); |
42 }; | 41 }; |
43 | 42 |
44 } // namespace printing | 43 } // namespace printing |
45 | 44 |
46 #endif // CHROME_BROWSER_PRINTING_PRINT_PREVIEW_MESSAGE_HANDLER_H_ | 45 #endif // CHROME_BROWSER_PRINTING_PRINT_PREVIEW_MESSAGE_HANDLER_H_ |
OLD | NEW |