| 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 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 357 void Finished(); | 357 void Finished(); |
| 358 | 358 |
| 359 // Cleanup after print preview fails. | 359 // Cleanup after print preview fails. |
| 360 void Failed(); | 360 void Failed(); |
| 361 | 361 |
| 362 // Helper functions | 362 // Helper functions |
| 363 int GetNextPageNumber(); | 363 int GetNextPageNumber(); |
| 364 bool IsReadyToRender() const; | 364 bool IsReadyToRender() const; |
| 365 bool IsModifiable() const; | 365 bool IsModifiable() const; |
| 366 bool IsLastPageOfPrintReadyMetafile() const; | 366 bool IsLastPageOfPrintReadyMetafile() const; |
| 367 bool IsFinalPageRendered() const; |
| 367 | 368 |
| 368 // Setters | 369 // Setters |
| 369 void set_generate_draft_pages(bool generate_draft_pages); | 370 void set_generate_draft_pages(bool generate_draft_pages); |
| 370 | 371 |
| 371 // Getters | 372 // Getters |
| 372 WebKit::WebFrame* frame() const; | 373 WebKit::WebFrame* frame() const; |
| 373 WebKit::WebNode* node() const; | 374 WebKit::WebNode* node() const; |
| 374 int total_page_count() const; | 375 int total_page_count() const; |
| 375 bool generate_draft_pages(); | 376 bool generate_draft_pages(); |
| 376 printing::PreviewMetafile* metafile() const; | 377 printing::PreviewMetafile* metafile() const; |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 416 | 417 |
| 417 State state_; | 418 State state_; |
| 418 }; | 419 }; |
| 419 | 420 |
| 420 PrintPreviewContext print_preview_context_; | 421 PrintPreviewContext print_preview_context_; |
| 421 | 422 |
| 422 DISALLOW_COPY_AND_ASSIGN(PrintWebViewHelper); | 423 DISALLOW_COPY_AND_ASSIGN(PrintWebViewHelper); |
| 423 }; | 424 }; |
| 424 | 425 |
| 425 #endif // CHROME_RENDERER_PRINT_WEB_VIEW_HELPER_H_ | 426 #endif // CHROME_RENDERER_PRINT_WEB_VIEW_HELPER_H_ |
| OLD | NEW |