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

Unified Diff: chrome/browser/printing/print_view_manager_base.h

Issue 2510753002: Revert of Make printing work better with OOPIF. (Closed)
Patch Set: Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/printing/print_view_manager.cc ('k') | chrome/browser/printing/print_view_manager_base.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/printing/print_view_manager_base.h
diff --git a/chrome/browser/printing/print_view_manager_base.h b/chrome/browser/printing/print_view_manager_base.h
index 6dac9ddfa3dcfed153e37e0618b625c73cd9f9c4..21cdb284998055d2d602a5b1bdac7c11aa5ee7af 100644
--- a/chrome/browser/printing/print_view_manager_base.h
+++ b/chrome/browser/printing/print_view_manager_base.h
@@ -4,8 +4,6 @@
#ifndef CHROME_BROWSER_PRINTING_PRINT_VIEW_MANAGER_BASE_H_
#define CHROME_BROWSER_PRINTING_PRINT_VIEW_MANAGER_BASE_H_
-
-#include <memory>
#include "base/macros.h"
#include "base/memory/ref_counted.h"
@@ -19,10 +17,6 @@
#include "printing/printed_pages_source.h"
struct PrintHostMsg_DidPrintPage_Params;
-
-namespace content {
-class RenderFrameHost;
-}
namespace printing {
@@ -43,11 +37,11 @@
// Prints the current document immediately. Since the rendering is
// asynchronous, the actual printing will not be completed on the return of
// this function. Returns false if printing is impossible at the moment.
- virtual bool PrintNow(content::RenderFrameHost* rfh);
+ virtual bool PrintNow();
#endif // ENABLE_BASIC_PRINTING
- // Whether printing is enabled or not.
- void UpdatePrintingEnabled();
+ // Whether to block scripted printing for our tab or not.
+ void UpdateScriptedPrintingBlocked();
// PrintedPagesSource implementation.
base::string16 RenderSourceName() override;
@@ -56,15 +50,13 @@
explicit PrintViewManagerBase(content::WebContents* web_contents);
// Helper method for Print*Now().
- bool PrintNowInternal(content::RenderFrameHost* rfh,
- std::unique_ptr<IPC::Message> message);
+ bool PrintNowInternal(IPC::Message* message);
- void SetPrintingRFH(content::RenderFrameHost* rfh);
+ // Terminates or cancels the print job if one was pending.
+ void RenderProcessGone(base::TerminationStatus status) override;
// content::WebContentsObserver implementation.
- void RenderFrameDeleted(content::RenderFrameHost* render_frame_host) override;
- bool OnMessageReceived(const IPC::Message& message,
- content::RenderFrameHost* render_frame_host) override;
+ bool OnMessageReceived(const IPC::Message& message) override;
private:
// content::NotificationObserver implementation.
@@ -109,6 +101,9 @@
// disconnect from it.
void DisconnectFromCurrentPrintJob();
+ // Notify that the printing is done.
+ void PrintingDone(bool success);
+
// Terminates the print job. No-op if no print job has been created. If
// |cancel| is true, cancel it instead of waiting for the job to finish. Will
// call ReleasePrintJob().
@@ -132,13 +127,7 @@
// Release the PrinterQuery associated with our |cookie_|.
void ReleasePrinterQuery();
- // Helper method for UpdatePrintingEnabled().
- void SendPrintingEnabled(bool enabled, content::RenderFrameHost* rfh);
-
content::NotificationRegistrar registrar_;
-
- // The current RFH that is printing with a system printing dialog.
- content::RenderFrameHost* printing_rfh_;
// Manages the low-level talk to the printer.
scoped_refptr<PrintJob> print_job_;
« no previous file with comments | « chrome/browser/printing/print_view_manager.cc ('k') | chrome/browser/printing/print_view_manager_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698