diff options
author | thestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-03 00:56:01 +0000 |
---|---|---|
committer | thestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-03 00:56:01 +0000 |
commit | 0c6a76e4a58d81d125d18f9b576d0c44fcf3449f (patch) | |
tree | cec7974ed73a510cd6bb69976ba8e4563876748b /chrome | |
parent | d5d62170b4464c8c41f51aa366fa67c7a4495f0b (diff) | |
download | chromium_src-0c6a76e4a58d81d125d18f9b576d0c44fcf3449f.zip chromium_src-0c6a76e4a58d81d125d18f9b576d0c44fcf3449f.tar.gz chromium_src-0c6a76e4a58d81d125d18f9b576d0c44fcf3449f.tar.bz2 |
Printing: Remove an unused variable, update some obsolete comments, and remove an unneeded prefs check.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/8386028
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@108378 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/printing/print_job_manager.h | 10 | ||||
-rw-r--r-- | chrome/browser/printing/printing_message_filter.cc | 2 | ||||
-rw-r--r-- | chrome/browser/printing/printing_message_filter.h | 16 | ||||
-rw-r--r-- | chrome/common/print_messages.h | 1 | ||||
-rw-r--r-- | chrome/renderer/print_web_view_helper.cc | 4 |
5 files changed, 15 insertions, 18 deletions
diff --git a/chrome/browser/printing/print_job_manager.h b/chrome/browser/printing/print_job_manager.h index 72548da..8d37537f 100644 --- a/chrome/browser/printing/print_job_manager.h +++ b/chrome/browser/printing/print_job_manager.h @@ -19,9 +19,7 @@ class PrefService; namespace printing { class JobEventDetails; -class PrintedDocument; class PrintJob; -class PrintedPage; class PrinterQuery; class PrintJobManager : public content::NotificationObserver { @@ -73,10 +71,14 @@ class PrintJobManager : public content::NotificationObserver { // Used to serialize access to queued_workers_. base::Lock lock_; - // Printing is enabled/disabled. This variable is checked at only one place, - // by RenderMessageFilter::OnGetDefaultPrintSettings. If its value is true + // Printing is enabled/disabled. For printing with the native print dialog, + // this variable is checked at only one place, by + // PrintingMessageFilter::OnGetDefaultPrintSettings. If its value is true // at that point, then the initiated print flow will complete itself, // even if the value of this variable changes afterwards. + // In the print preview workflow, this variable is checked in + // PrintingMessageFilter::OnUpdatePrintSettings, which gets called multiple + // times in the print preview workflow. BooleanPrefMember printing_enabled_; PrinterQueries queued_queries_; diff --git a/chrome/browser/printing/printing_message_filter.cc b/chrome/browser/printing/printing_message_filter.cc index fbf75fc..8958dba 100644 --- a/chrome/browser/printing/printing_message_filter.cc +++ b/chrome/browser/printing/printing_message_filter.cc @@ -243,7 +243,6 @@ void PrintingMessageFilter::OnScriptedPrint( this, &PrintingMessageFilter::OnScriptedPrintReply, printer_query, - params.routing_id, reply_msg); printer_query->GetSettings(printing::PrinterQuery::ASK_USER, @@ -256,7 +255,6 @@ void PrintingMessageFilter::OnScriptedPrint( void PrintingMessageFilter::OnScriptedPrintReply( scoped_refptr<printing::PrinterQuery> printer_query, - int routing_id, IPC::Message* reply_msg) { PrintMsg_PrintPages_Params params; if (printer_query->last_status() != printing::PrintingContext::OK || diff --git a/chrome/browser/printing/printing_message_filter.h b/chrome/browser/printing/printing_message_filter.h index e257370..955ff17 100644 --- a/chrome/browser/printing/printing_message_filter.h +++ b/chrome/browser/printing/printing_message_filter.h @@ -54,24 +54,25 @@ class PrintingMessageFilter : public BrowserMessageFilter { void OnTempFileForPrintingWritten(int sequence_number); #endif - // A javascript code requested to print the current page. This is done in two - // steps and this is the first step. Get the print setting right here - // synchronously. It will hang the I/O completely. + // Get the default print setting. The task is handled by the print + // worker thread and the UI thread. The reply occurs on the IO thread. void OnGetDefaultPrintSettings(IPC::Message* reply_msg); void OnGetDefaultPrintSettingsReply( scoped_refptr<printing::PrinterQuery> printer_query, IPC::Message* reply_msg); - // A javascript code requested to print the current page. The renderer host - // have to show to the user the print dialog and returns the selected print - // settings. + // The renderer host have to show to the user the print dialog and returns + // the selected print settings. The task is handled by the print worker + // thread and the UI thread. The reply occurs on the IO thread. void OnScriptedPrint(const PrintHostMsg_ScriptedPrint_Params& params, IPC::Message* reply_msg); void OnScriptedPrintReply( scoped_refptr<printing::PrinterQuery> printer_query, - int routing_id, IPC::Message* reply_msg); + // Modify the current print settings based on |job_settings|. The task is + // handled by the print worker thread and the UI thread. The reply occurs on + // the IO thread. void OnUpdatePrintSettings(int document_cookie, const base::DictionaryValue& job_settings, IPC::Message* reply_msg); @@ -79,6 +80,7 @@ class PrintingMessageFilter : public BrowserMessageFilter { scoped_refptr<printing::PrinterQuery> printer_query, IPC::Message* reply_msg); + // Check to see if print preview has been cancelled. void OnCheckForCancel(const std::string& preview_ui_addr, int preview_request_id, bool* cancel); diff --git a/chrome/common/print_messages.h b/chrome/common/print_messages.h index 12c2845..a12b38f 100644 --- a/chrome/common/print_messages.h +++ b/chrome/common/print_messages.h @@ -237,7 +237,6 @@ IPC_STRUCT_END() // Parameters for the IPC message ViewHostMsg_ScriptedPrint IPC_STRUCT_BEGIN(PrintHostMsg_ScriptedPrint_Params) - IPC_STRUCT_MEMBER(int, routing_id) IPC_STRUCT_MEMBER(gfx::NativeViewId, host_window_id) IPC_STRUCT_MEMBER(int, cookie) IPC_STRUCT_MEMBER(int, expected_pages_count) diff --git a/chrome/renderer/print_web_view_helper.cc b/chrome/renderer/print_web_view_helper.cc index 4df68f0..1b4008a 100644 --- a/chrome/renderer/print_web_view_helper.cc +++ b/chrome/renderer/print_web_view_helper.cc @@ -1167,10 +1167,6 @@ bool PrintWebViewHelper::GetPrintSettingsFromUser(WebKit::WebFrame* frame, PrintHostMsg_ScriptedPrint_Params params; PrintMsg_PrintPages_Params print_settings; - // The routing id is sent across as it is needed to look up the - // corresponding RenderViewHost instance to signal and reset the - // pump messages event. - params.routing_id = render_view()->GetRoutingId(); // host_window_ may be NULL at this point if the current window is a // popup and the print() command has been issued from the parent. The // receiver of this message has to deal with this. |