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

Unified Diff: chrome/browser/printing/print_view_manager.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
Index: chrome/browser/printing/print_view_manager.h
diff --git a/chrome/browser/printing/print_view_manager.h b/chrome/browser/printing/print_view_manager.h
index 7c6ddf2b397a8ecf48cd257b816b9926ccb51790..89cbc741a665b41c3b090159113a7e333711890f 100644
--- a/chrome/browser/printing/print_view_manager.h
+++ b/chrome/browser/printing/print_view_manager.h
@@ -11,7 +11,6 @@
#include "printing/features/features.h"
namespace content {
-class RenderFrameHost;
class RenderProcessHost;
}
@@ -32,14 +31,14 @@
// Same as PrintNow(), but for the case where a user press "ctrl+shift+p" to
// show the native system dialog. This can happen from both initiator and
// preview dialog.
- bool BasicPrint(content::RenderFrameHost* rfh);
+ bool BasicPrint();
#endif // ENABLE_BASIC_PRINTING
// Initiate print preview of the current document by first notifying the
// renderer. Since this happens asynchronous, the print preview dialog
// creation will not be completed on the return of this function. Returns
// false if print preview is impossible at the moment.
- bool PrintPreviewNow(content::RenderFrameHost* rfh, bool has_selection);
+ bool PrintPreviewNow(bool selection_only);
// Notify PrintViewManager that print preview is starting in the renderer for
// a particular WebNode.
@@ -50,12 +49,14 @@
void PrintPreviewDone();
// content::WebContentsObserver implementation.
+ bool OnMessageReceived(const IPC::Message& message) override;
+
+ // content::WebContentsObserver implementation.
void RenderFrameCreated(content::RenderFrameHost* render_frame_host) override;
- void RenderFrameDeleted(content::RenderFrameHost* render_frame_host) override;
- bool OnMessageReceived(const IPC::Message& message,
- content::RenderFrameHost* render_frame_host) override;
- content::RenderFrameHost* print_preview_rfh() { return print_preview_rfh_; }
+ // content::WebContentsObserver implementation.
+ // Terminates or cancels the print job if one was pending.
+ void RenderProcessGone(base::TerminationStatus status) override;
private:
explicit PrintViewManager(content::WebContents* web_contents);
@@ -68,21 +69,15 @@
};
// IPC Message handlers.
- void OnDidShowPrintDialog(content::RenderFrameHost* rfh);
- void OnSetupScriptedPrintPreview(content::RenderFrameHost* rfh,
- IPC::Message* reply_msg);
- void OnShowScriptedPrintPreview(content::RenderFrameHost* rfh,
- bool source_is_modifiable);
+ void OnDidShowPrintDialog();
+ void OnSetupScriptedPrintPreview(IPC::Message* reply_msg);
+ void OnShowScriptedPrintPreview(bool source_is_modifiable);
void OnScriptedPrintPreviewReply(IPC::Message* reply_msg);
base::Closure on_print_dialog_shown_callback_;
// Current state of print preview for this view.
PrintPreviewState print_preview_state_;
-
- // The current RFH that is print previewing. It should be a nullptr when
- // |print_preview_state_| is NOT_PREVIEWING.
- content::RenderFrameHost* print_preview_rfh_;
// Keeps track of the pending callback during scripted print preview.
content::RenderProcessHost* scripted_print_preview_rph_;
« no previous file with comments | « chrome/browser/printing/print_preview_message_handler.cc ('k') | chrome/browser/printing/print_view_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698