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

Unified Diff: chrome/browser/printing/printing_message_filter.cc

Issue 10388214: Make cloud print dialog creation function not use browser list, instead obtain profile and parent w… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/printing/printing_message_filter.cc
===================================================================
--- chrome/browser/printing/printing_message_filter.cc (revision 138102)
+++ chrome/browser/printing/printing_message_filter.cc (working copy)
@@ -76,8 +76,9 @@
} // namespace
-PrintingMessageFilter::PrintingMessageFilter()
- : print_job_manager_(g_browser_process->print_job_manager()) {
+PrintingMessageFilter::PrintingMessageFilter(int render_process_id)
+ : print_job_manager_(g_browser_process->print_job_manager()),
+ render_process_id_(render_process_id) {
}
PrintingMessageFilter::~PrintingMessageFilter() {
@@ -155,7 +156,8 @@
}
}
-void PrintingMessageFilter::OnTempFileForPrintingWritten(int sequence_number) {
+void PrintingMessageFilter::OnTempFileForPrintingWritten(int render_view_id,
+ int sequence_number) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
SequenceToPathMap* map = &g_printing_file_descriptor_map.Get().map;
SequenceToPathMap::iterator it = map->find(sequence_number);
@@ -165,7 +167,12 @@
return;
}
+ content::RenderViewHost* view = content::RenderViewHost::FromID(
+ render_process_id_, render_view_id);
+ content::WebContents* wc = view->GetDelegate()->GetAsWebContents();
print_dialog_cloud::CreatePrintDialogForFile(
+ wc->GetBrowserContext(),
+ wc->GetView()->GetTopLevelNativeWindow(),
it->second,
string16(),
string16(),

Powered by Google App Engine
This is Rietveld 408576698