Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(76)

Side by Side Diff: chrome/renderer/printing/print_web_view_helper_delegate.h

Issue 791133006: Delegates for the printing component (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698