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

Side by Side Diff: components/printing/renderer/print_web_view_helper.h

Issue 822133003: Refactor webview to use //components/printing (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
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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 // Cancels prerender if it's currently in progress and returns |true| if 74 // Cancels prerender if it's currently in progress and returns |true| if
75 // the cancellation was done with success. 75 // the cancellation was done with success.
76 virtual bool CancelPrerender(content::RenderView* render_view, 76 virtual bool CancelPrerender(content::RenderView* render_view,
77 int routing_id) = 0; 77 int routing_id) = 0;
78 78
79 // Returns the element to be printed. Returns a null WebElement if 79 // Returns the element to be printed. Returns a null WebElement if
80 // a pdf plugin element can't be extracted from the frame. 80 // a pdf plugin element can't be extracted from the frame.
81 virtual blink::WebElement GetPdfElement(blink::WebLocalFrame* frame) = 0; 81 virtual blink::WebElement GetPdfElement(blink::WebLocalFrame* frame) = 0;
82 }; 82 };
83 83
84 // TODO(dgn) arg scripted_print_blocked: used to disable scripted
85 // for webview. Removed after crbug.com/322303 is solved
84 PrintWebViewHelper(content::RenderView* render_view, 86 PrintWebViewHelper(content::RenderView* render_view,
85 bool out_of_process_pdf_enabled, 87 bool out_of_process_pdf_enabled,
86 bool print_preview_disabled, 88 bool print_preview_disabled,
89 bool scripted_print_blocked,
87 scoped_ptr<Delegate> delegate); 90 scoped_ptr<Delegate> delegate);
88 ~PrintWebViewHelper() override; 91 ~PrintWebViewHelper() override;
89 92
90 // Disable print preview and switch to system dialog printing even if full 93 // Disable print preview and switch to system dialog printing even if full
91 // printing is build-in. This method is used by CEF. 94 // printing is build-in. This method is used by CEF.
92 static void DisablePreview(); 95 static void DisablePreview();
93 96
94 bool IsPrintingEnabled(); 97 bool IsPrintingEnabled();
95 98
96 void PrintNode(const blink::WebNode& node); 99 void PrintNode(const blink::WebNode& node);
(...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after
490 base::Closure on_stop_loading_closure_; 493 base::Closure on_stop_loading_closure_;
491 494
492 base::WeakPtrFactory<PrintWebViewHelper> weak_ptr_factory_; 495 base::WeakPtrFactory<PrintWebViewHelper> weak_ptr_factory_;
493 496
494 DISALLOW_COPY_AND_ASSIGN(PrintWebViewHelper); 497 DISALLOW_COPY_AND_ASSIGN(PrintWebViewHelper);
495 }; 498 };
496 499
497 } // namespace printing 500 } // namespace printing
498 501
499 #endif // COMPONENTS_PRINTING_RENDERER_PRINT_WEB_VIEW_HELPER_H_ 502 #endif // COMPONENTS_PRINTING_RENDERER_PRINT_WEB_VIEW_HELPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698