OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_RENDERER_PRINTING_CHROME_PRINT_WEB_VIEW_HELPER_DELEGATE_H_ |
| 6 #define CHROME_RENDERER_PRINTING_CHROME_PRINT_WEB_VIEW_HELPER_DELEGATE_H_ |
| 7 |
| 8 #include "chrome/renderer/printing/print_web_view_helper_delegate.h" |
| 9 |
| 10 // Could be owned by the helper or the client, or could be a specialized |
| 11 // implementation of the helper |
| 12 |
| 13 namespace printing { |
| 14 |
| 15 class ChromePrintWebViewHelperDelegate : public PrintWebViewHelperDelegate { |
| 16 public: |
| 17 ChromePrintWebViewHelperDelegate(); |
| 18 ~ChromePrintWebViewHelperDelegate() override; |
| 19 |
| 20 virtual bool OutOfProcessPdfEnabled() override; |
| 21 |
| 22 // Returns the element to be printed. Returns a new WebElement if |
| 23 // a pdf plugin element can't be extracted from the frame. |
| 24 virtual blink::WebElement GetPdfElement(blink::WebLocalFrame* frame) override; |
| 25 |
| 26 // Returns the preview page |
| 27 virtual base::StringValue GetPrintPreviewHtml() override; |
| 28 |
| 29 // Returns whether print preview should be disabled |
| 30 virtual bool PrintPreviewDisabled() override; |
| 31 |
| 32 // If a scripted print needs to be cancelled, returns a message to be sent |
| 33 // before cancelling print. Else returns |nullptr|. |
| 34 virtual IPC::Message* GetScriptedPrintCancelMessage( |
| 35 content::RenderView* render_view, |
| 36 int routing_id) override; |
| 37 }; // class ChromePrintWebViewHelperDelegate |
| 38 |
| 39 } // namespace printing |
| 40 |
| 41 #endif // CHROME_RENDERER_PRINTING_CHROME_PRINT_WEB_VIEW_HELPER_DELEGATE_H_ |
OLD | NEW |