| 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_RENDERER_PRINT_WEB_VIEW_HELPER_H_ | 5 #ifndef CHROME_RENDERER_PRINT_WEB_VIEW_HELPER_H_ |
| 6 #define CHROME_RENDERER_PRINT_WEB_VIEW_HELPER_H_ | 6 #define CHROME_RENDERER_PRINT_WEB_VIEW_HELPER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 explicit PrintWebViewHelper(RenderView* render_view); | 82 explicit PrintWebViewHelper(RenderView* render_view); |
| 83 virtual ~PrintWebViewHelper(); | 83 virtual ~PrintWebViewHelper(); |
| 84 | 84 |
| 85 // Prints |frame|. | 85 // Prints |frame|. |
| 86 void PrintFrame(WebKit::WebFrame* frame, | 86 void PrintFrame(WebKit::WebFrame* frame, |
| 87 bool script_initiated, | 87 bool script_initiated, |
| 88 bool is_preview); | 88 bool is_preview); |
| 89 | 89 |
| 90 // Message handlers. Public for testing. | 90 // Message handlers. Public for testing. |
| 91 void OnPrintingDone(int document_cookie, bool success); | 91 void OnPrintingDone(int document_cookie, bool success); |
| 92 void OnPrintForPrintPreview(); |
| 92 void OnPrintPages(); | 93 void OnPrintPages(); |
| 93 void OnPrintPreview(); | 94 void OnPrintPreview(); |
| 94 void OnPrintNodeUnderContextMenu(); | 95 void OnPrintNodeUnderContextMenu(); |
| 95 | 96 |
| 96 protected: | 97 protected: |
| 97 bool CopyAndPrint(WebKit::WebFrame* web_frame); | 98 bool CopyAndPrint(WebKit::WebFrame* web_frame); |
| 98 | 99 |
| 99 // Prints the page listed in |params|. | 100 // Prints the page listed in |params|. |
| 100 #if defined(USE_X11) | 101 #if defined(USE_X11) |
| 101 void PrintPage(const ViewMsg_PrintPage_Params& params, | 102 void PrintPage(const ViewMsg_PrintPage_Params& params, |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 scoped_ptr<ViewMsg_PrintPages_Params> print_pages_params_; | 199 scoped_ptr<ViewMsg_PrintPages_Params> print_pages_params_; |
| 199 base::Time last_cancelled_script_print_; | 200 base::Time last_cancelled_script_print_; |
| 200 int user_cancelled_scripted_print_count_; | 201 int user_cancelled_scripted_print_count_; |
| 201 bool is_preview_; | 202 bool is_preview_; |
| 202 | 203 |
| 203 private: | 204 private: |
| 204 DISALLOW_COPY_AND_ASSIGN(PrintWebViewHelper); | 205 DISALLOW_COPY_AND_ASSIGN(PrintWebViewHelper); |
| 205 }; | 206 }; |
| 206 | 207 |
| 207 #endif // CHROME_RENDERER_PRINT_WEB_VIEW_HELPER_H_ | 208 #endif // CHROME_RENDERER_PRINT_WEB_VIEW_HELPER_H_ |
| OLD | NEW |