OLD | NEW |
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 #include "chrome/browser/printing/printing_message_filter.h" | 5 #include "chrome/browser/printing/printing_message_filter.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "chrome/browser/browser_process.h" | 10 #include "chrome/browser/browser_process.h" |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 params->should_print_backgrounds = settings.should_print_backgrounds(); | 83 params->should_print_backgrounds = settings.should_print_backgrounds(); |
84 params->display_header_footer = settings.display_header_footer(); | 84 params->display_header_footer = settings.display_header_footer(); |
85 params->title = settings.title(); | 85 params->title = settings.title(); |
86 params->url = settings.url(); | 86 params->url = settings.url(); |
87 } | 87 } |
88 | 88 |
89 } // namespace | 89 } // namespace |
90 | 90 |
91 PrintingMessageFilter::PrintingMessageFilter(int render_process_id, | 91 PrintingMessageFilter::PrintingMessageFilter(int render_process_id, |
92 Profile* profile) | 92 Profile* profile) |
93 : BrowserMessageFilter(PrintMsgStart), | 93 : profile_io_data_(ProfileIOData::FromResourceContext( |
94 profile_io_data_(ProfileIOData::FromResourceContext( | |
95 profile->GetResourceContext())), | 94 profile->GetResourceContext())), |
96 render_process_id_(render_process_id), | 95 render_process_id_(render_process_id), |
97 queue_(g_browser_process->print_job_manager()->queue()) { | 96 queue_(g_browser_process->print_job_manager()->queue()) { |
98 DCHECK(queue_); | 97 DCHECK(queue_); |
99 } | 98 } |
100 | 99 |
101 PrintingMessageFilter::~PrintingMessageFilter() { | 100 PrintingMessageFilter::~PrintingMessageFilter() { |
102 } | 101 } |
103 | 102 |
104 void PrintingMessageFilter::OverrideThreadForMessage( | 103 void PrintingMessageFilter::OverrideThreadForMessage( |
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
472 | 471 |
473 #if defined(ENABLE_FULL_PRINTING) | 472 #if defined(ENABLE_FULL_PRINTING) |
474 void PrintingMessageFilter::OnCheckForCancel(int32 preview_ui_id, | 473 void PrintingMessageFilter::OnCheckForCancel(int32 preview_ui_id, |
475 int preview_request_id, | 474 int preview_request_id, |
476 bool* cancel) { | 475 bool* cancel) { |
477 PrintPreviewUI::GetCurrentPrintPreviewStatus(preview_ui_id, | 476 PrintPreviewUI::GetCurrentPrintPreviewStatus(preview_ui_id, |
478 preview_request_id, | 477 preview_request_id, |
479 cancel); | 478 cancel); |
480 } | 479 } |
481 #endif | 480 #endif |
OLD | NEW |