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

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

Issue 7015026: Cancel prerenders for pages that call window.print() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comment responses. Created 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #ifndef CHROME_BROWSER_PRINTING_PRINT_JOB_MANAGER_H_ 5 #ifndef CHROME_BROWSER_PRINTING_PRINT_JOB_MANAGER_H_
6 #define CHROME_BROWSER_PRINTING_PRINT_JOB_MANAGER_H_ 6 #define CHROME_BROWSER_PRINTING_PRINT_JOB_MANAGER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <vector> 9 #include <vector>
10 10
(...skipping 27 matching lines...) Expand all
38 38
39 // Stops all printing jobs. If wait_for_finish is true, tries to give jobs 39 // Stops all printing jobs. If wait_for_finish is true, tries to give jobs
40 // a chance to complete before stopping them. 40 // a chance to complete before stopping them.
41 void StopJobs(bool wait_for_finish); 41 void StopJobs(bool wait_for_finish);
42 42
43 // Queues a semi-initialized worker thread. Can be called from any thread. 43 // Queues a semi-initialized worker thread. Can be called from any thread.
44 // Current use case is queuing from the I/O thread. 44 // Current use case is queuing from the I/O thread.
45 // TODO(maruel): Have them vanish after a timeout (~5 minutes?) 45 // TODO(maruel): Have them vanish after a timeout (~5 minutes?)
46 void QueuePrinterQuery(PrinterQuery* job); 46 void QueuePrinterQuery(PrinterQuery* job);
47 47
48 // Pops a queued PrintJobWorkerOwner object and posts a task to stop the
49 // worker. Can be called from any thread.
50 void PopAndStopPrinterQuery(int document_cookie);
51
48 // Pops a queued PrintJobWorkerOwner object that was previously queued. Can be 52 // Pops a queued PrintJobWorkerOwner object that was previously queued. Can be
49 // called from any thread. Current use case is poping from the browser thread. 53 // called from any thread. Current use case is poping from the browser thread.
50 void PopPrinterQuery(int document_cookie, scoped_refptr<PrinterQuery>* job); 54 void PopPrinterQuery(int document_cookie, scoped_refptr<PrinterQuery>* job);
51 55
52 static void RegisterPrefs(PrefService* prefs); 56 static void RegisterPrefs(PrefService* prefs);
53 57
54 // NotificationObserver 58 // NotificationObserver
55 virtual void Observe(NotificationType type, 59 virtual void Observe(NotificationType type,
56 const NotificationSource& source, 60 const NotificationSource& source,
57 const NotificationDetails& details); 61 const NotificationDetails& details);
(...skipping 25 matching lines...) Expand all
83 87
84 // Current print jobs that are active. 88 // Current print jobs that are active.
85 PrintJobs current_jobs_; 89 PrintJobs current_jobs_;
86 90
87 DISALLOW_COPY_AND_ASSIGN(PrintJobManager); 91 DISALLOW_COPY_AND_ASSIGN(PrintJobManager);
88 }; 92 };
89 93
90 } // namespace printing 94 } // namespace printing
91 95
92 #endif // CHROME_BROWSER_PRINTING_PRINT_JOB_MANAGER_H_ 96 #endif // CHROME_BROWSER_PRINTING_PRINT_JOB_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698