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

Side by Side Diff: chrome/browser/printing/print_job_manager.cc

Issue 478183005: Added PrintingContext::Delegate to get parent view handle and application locale. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Mon Aug 25 23:50:54 PDT 2014 Created 6 years, 3 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/print_job_manager.h" 5 #include "chrome/browser/printing/print_job_manager.h"
6 6
7 #include "chrome/browser/chrome_notification_types.h" 7 #include "chrome/browser/chrome_notification_types.h"
8 #include "chrome/browser/printing/print_job.h" 8 #include "chrome/browser/printing/print_job.h"
9 #include "chrome/browser/printing/printer_query.h" 9 #include "chrome/browser/printing/printer_query.h"
10 #include "content/public/browser/browser_thread.h" 10 #include "content/public/browser/browser_thread.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 if ((*itr)->cookie() == document_cookie && !(*itr)->is_callback_pending()) { 42 if ((*itr)->cookie() == document_cookie && !(*itr)->is_callback_pending()) {
43 scoped_refptr<printing::PrinterQuery> current_query(*itr); 43 scoped_refptr<printing::PrinterQuery> current_query(*itr);
44 queued_queries_.erase(itr); 44 queued_queries_.erase(itr);
45 DCHECK(current_query->is_valid()); 45 DCHECK(current_query->is_valid());
46 return current_query; 46 return current_query;
47 } 47 }
48 } 48 }
49 return NULL; 49 return NULL;
50 } 50 }
51 51
52 scoped_refptr<PrinterQuery> PrintQueriesQueue::CreatePrinterQuery() { 52 scoped_refptr<PrinterQuery> PrintQueriesQueue::CreatePrinterQuery(
53 scoped_refptr<PrinterQuery> job = new printing::PrinterQuery; 53 int render_process_id,
54 int render_view_id) {
55 scoped_refptr<PrinterQuery> job =
56 new printing::PrinterQuery(render_process_id, render_view_id);
54 base::AutoLock lock(lock_); 57 base::AutoLock lock(lock_);
55 job->SetWorkerDestination(destination_); 58 job->SetWorkerDestination(destination_);
56 return job; 59 return job;
57 } 60 }
58 61
59 void PrintQueriesQueue::Shutdown() { 62 void PrintQueriesQueue::Shutdown() {
60 PrinterQueries queries_to_stop; 63 PrinterQueries queries_to_stop;
61 { 64 {
62 base::AutoLock lock(lock_); 65 base::AutoLock lock(lock_);
63 queued_queries_.swap(queries_to_stop); 66 queued_queries_.swap(queries_to_stop);
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 break; 163 break;
161 } 164 }
162 default: { 165 default: {
163 NOTREACHED(); 166 NOTREACHED();
164 break; 167 break;
165 } 168 }
166 } 169 }
167 } 170 }
168 171
169 } // namespace printing 172 } // namespace printing
OLDNEW
« no previous file with comments | « chrome/browser/printing/print_job_manager.h ('k') | chrome/browser/printing/print_job_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698