| 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 #ifndef COMPONENTS_PRINTING_RENDERER_PRINT_WEB_VIEW_HELPER_H_ | 5 #ifndef COMPONENTS_PRINTING_RENDERER_PRINT_WEB_VIEW_HELPER_H_ |
| 6 #define COMPONENTS_PRINTING_RENDERER_PRINT_WEB_VIEW_HELPER_H_ | 6 #define COMPONENTS_PRINTING_RENDERER_PRINT_WEB_VIEW_HELPER_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 | 87 |
| 88 // Cancels prerender if it's currently in progress and returns |true| if | 88 // Cancels prerender if it's currently in progress and returns |true| if |
| 89 // the cancellation was done with success. | 89 // the cancellation was done with success. |
| 90 virtual bool CancelPrerender(content::RenderView* render_view, | 90 virtual bool CancelPrerender(content::RenderView* render_view, |
| 91 int routing_id) = 0; | 91 int routing_id) = 0; |
| 92 | 92 |
| 93 // Returns the element to be printed. Returns a null WebElement if | 93 // Returns the element to be printed. Returns a null WebElement if |
| 94 // a pdf plugin element can't be extracted from the frame. | 94 // a pdf plugin element can't be extracted from the frame. |
| 95 virtual blink::WebElement GetPdfElement(blink::WebLocalFrame* frame) = 0; | 95 virtual blink::WebElement GetPdfElement(blink::WebLocalFrame* frame) = 0; |
| 96 | 96 |
| 97 // Used to know whether the content to print could be nested in an iframe. | |
| 98 virtual bool IsOutOfProcessPdfEnabled() = 0; | |
| 99 | |
| 100 virtual bool IsPrintPreviewEnabled() = 0; | 97 virtual bool IsPrintPreviewEnabled() = 0; |
| 101 | 98 |
| 102 // If true, the user can be asked to provide print settings. | 99 // If true, the user can be asked to provide print settings. |
| 103 // The default implementation returns |true|. | 100 // The default implementation returns |true|. |
| 104 virtual bool IsAskPrintSettingsEnabled(); | 101 virtual bool IsAskPrintSettingsEnabled(); |
| 105 | 102 |
| 106 // If false, window.print() won't do anything. | 103 // If false, window.print() won't do anything. |
| 107 // The default implementation returns |true|. | 104 // The default implementation returns |true|. |
| 108 virtual bool IsScriptedPrintEnabled(); | 105 virtual bool IsScriptedPrintEnabled(); |
| 109 | 106 |
| (...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 516 base::Closure on_stop_loading_closure_; | 513 base::Closure on_stop_loading_closure_; |
| 517 | 514 |
| 518 base::WeakPtrFactory<PrintWebViewHelper> weak_ptr_factory_; | 515 base::WeakPtrFactory<PrintWebViewHelper> weak_ptr_factory_; |
| 519 | 516 |
| 520 DISALLOW_COPY_AND_ASSIGN(PrintWebViewHelper); | 517 DISALLOW_COPY_AND_ASSIGN(PrintWebViewHelper); |
| 521 }; | 518 }; |
| 522 | 519 |
| 523 } // namespace printing | 520 } // namespace printing |
| 524 | 521 |
| 525 #endif // COMPONENTS_PRINTING_RENDERER_PRINT_WEB_VIEW_HELPER_H_ | 522 #endif // COMPONENTS_PRINTING_RENDERER_PRINT_WEB_VIEW_HELPER_H_ |
| OLD | NEW |