Chromium Code Reviews| Index: chrome/renderer/printing/print_web_view_helper_delegate.h |
| diff --git a/chrome/renderer/printing/print_web_view_helper_delegate.h b/chrome/renderer/printing/print_web_view_helper_delegate.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..64441cea875c2d669c45a3d5fab9161fdc832f89 |
| --- /dev/null |
| +++ b/chrome/renderer/printing/print_web_view_helper_delegate.h |
| @@ -0,0 +1,53 @@ |
| +// Copyright (c) 2014 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef COMPONENTS_PRINTING_PRINT_WEB_VIEW_HELPER_DELEGATE_H_ |
| +#define COMPONENTS_PRINTING_PRINT_WEB_VIEW_HELPER_DELEGATE_H_ |
| + |
| +#include "third_party/WebKit/public/web/WebElement.h" |
| + |
| +namespace blink { |
| +class WebLocalFrame; |
| +} |
| + |
| +namespace base { |
| +class StringValue; |
| +} |
| + |
| +namespace content { |
| +class RenderView; |
| +} |
| + |
| +namespace IPC { |
| +class Message; |
| +} |
| + |
| +namespace printing { |
| + |
| +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.
|
| + public: |
| + virtual ~PrintWebViewHelperDelegate() {} |
| + |
| + virtual bool OutOfProcessPdfEnabled(); |
| + |
| + // Returns the element to be printed. Returns a new WebElement if |
| + // a pdf plugin element can't be extracted from the frame. |
| + virtual blink::WebElement GetPdfElement(blink::WebLocalFrame* frame) = 0; |
| + |
| + // Returns the preview page |
| + virtual base::StringValue GetPrintPreviewHtml() = 0; |
| + |
| + // Returns whether print preview should be disabled |
| + virtual bool PrintPreviewDisabled() = 0; |
| + |
| + // If a scripted print needs to be cancelled, returns a message to be sent |
| + // before cancelling print. Else returns |nullptr|. |
| + virtual IPC::Message* GetScriptedPrintCancelMessage( |
| + content::RenderView* render_view, |
| + int render_id) = 0; |
| +}; // class PrintWebViewHelperDelegate |
| + |
| +} // namespace printing |
| + |
| +#endif // COMPONENTS_PRINTING_PRINT_WEB_VIEW_HELPER_DELEGATE_H_ |