Chromium Code Reviews| 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 COMPONENTS_PRINTING_PRINT_WEB_VIEW_HELPER_DELEGATE_H_ | |
| 6 #define COMPONENTS_PRINTING_PRINT_WEB_VIEW_HELPER_DELEGATE_H_ | |
| 7 | |
| 8 #include "third_party/WebKit/public/web/WebElement.h" | |
| 9 | |
| 10 namespace blink { | |
| 11 class WebLocalFrame; | |
| 12 } | |
| 13 | |
| 14 namespace base { | |
| 15 class StringValue; | |
| 16 } | |
| 17 | |
| 18 namespace content { | |
| 19 class RenderView; | |
| 20 } | |
| 21 | |
| 22 namespace IPC { | |
| 23 class Message; | |
| 24 } | |
| 25 | |
| 26 namespace printing { | |
| 27 | |
| 28 class PrintWebViewHelperDelegate { | |
|
Vitaly Buka (NO REVIEWS)
2015/01/05 19:57:03
it's a trivial interface
Could we make it a nested
dgn
2015/01/05 22:45:47
Done.
| |
| 29 public: | |
| 30 virtual ~PrintWebViewHelperDelegate() {} | |
| 31 | |
| 32 virtual bool OutOfProcessPdfEnabled(); | |
| 33 | |
| 34 // Returns the element to be printed. Returns a new WebElement if | |
| 35 // a pdf plugin element can't be extracted from the frame. | |
| 36 virtual blink::WebElement GetPdfElement(blink::WebLocalFrame* frame) = 0; | |
| 37 | |
| 38 // Returns the preview page | |
| 39 virtual base::StringValue GetPrintPreviewHtml() = 0; | |
| 40 | |
| 41 // Returns whether print preview should be disabled | |
| 42 virtual bool PrintPreviewDisabled() = 0; | |
| 43 | |
| 44 // If a scripted print needs to be cancelled, returns a message to be sent | |
| 45 // before cancelling print. Else returns |nullptr|. | |
| 46 virtual IPC::Message* GetScriptedPrintCancelMessage( | |
| 47 content::RenderView* render_view, | |
| 48 int render_id) = 0; | |
| 49 }; // class PrintWebViewHelperDelegate | |
| 50 | |
| 51 } // namespace printing | |
| 52 | |
| 53 #endif // COMPONENTS_PRINTING_PRINT_WEB_VIEW_HELPER_DELEGATE_H_ | |
| OLD | NEW |