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

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

Issue 858363002: OOP PDF: Override printing for MimeHandlerViewContainers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mime-handler-api-simpler
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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 virtual ~Delegate() {} 72 virtual ~Delegate() {}
73 73
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
83 // Returns true if printing is overridden and the default behavior should be
84 // skipped for |frame|.
85 virtual bool OverridePrint(blink::WebLocalFrame* frame) = 0;
82 }; 86 };
83 87
84 PrintWebViewHelper(content::RenderView* render_view, 88 PrintWebViewHelper(content::RenderView* render_view,
85 bool out_of_process_pdf_enabled, 89 bool out_of_process_pdf_enabled,
86 bool print_preview_disabled, 90 bool print_preview_disabled,
87 scoped_ptr<Delegate> delegate); 91 scoped_ptr<Delegate> delegate);
88 ~PrintWebViewHelper() override; 92 ~PrintWebViewHelper() override;
89 93
90 // Disable print preview and switch to system dialog printing even if full 94 // Disable print preview and switch to system dialog printing even if full
91 // printing is build-in. This method is used by CEF. 95 // printing is build-in. This method is used by CEF.
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after
490 base::Closure on_stop_loading_closure_; 494 base::Closure on_stop_loading_closure_;
491 495
492 base::WeakPtrFactory<PrintWebViewHelper> weak_ptr_factory_; 496 base::WeakPtrFactory<PrintWebViewHelper> weak_ptr_factory_;
493 497
494 DISALLOW_COPY_AND_ASSIGN(PrintWebViewHelper); 498 DISALLOW_COPY_AND_ASSIGN(PrintWebViewHelper);
495 }; 499 };
496 500
497 } // namespace printing 501 } // namespace printing
498 502
499 #endif // COMPONENTS_PRINTING_RENDERER_PRINT_WEB_VIEW_HELPER_H_ 503 #endif // COMPONENTS_PRINTING_RENDERER_PRINT_WEB_VIEW_HELPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698