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

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: fix android compile and remove the test as it hits a probably dodgy assert 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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 // Used to know whether the content to print could be nested in an iframe. 83 // Used to know whether the content to print could be nested in an iframe.
84 virtual bool IsOutOfProcessPdfEnabled() = 0; 84 virtual bool IsOutOfProcessPdfEnabled() = 0;
85 85
86 virtual bool IsPrintPreviewEnabled() = 0; 86 virtual bool IsPrintPreviewEnabled() = 0;
87
88 // Returns true if printing is overridden and the default behavior should be
89 // skipped for |frame|.
90 virtual bool OverridePrint(blink::WebLocalFrame* frame) = 0;
87 }; 91 };
88 92
89 PrintWebViewHelper(content::RenderView* render_view, 93 PrintWebViewHelper(content::RenderView* render_view,
90 scoped_ptr<Delegate> delegate); 94 scoped_ptr<Delegate> delegate);
91 ~PrintWebViewHelper() override; 95 ~PrintWebViewHelper() override;
92 96
93 // Disable print preview and switch to system dialog printing even if full 97 // Disable print preview and switch to system dialog printing even if full
94 // printing is build-in. This method is used by CEF. 98 // printing is build-in. This method is used by CEF.
95 static void DisablePreview(); 99 static void DisablePreview();
96 100
(...skipping 393 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