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

Side by Side Diff: chrome/browser/chromeos/printing/cups_print_job_manager.h

Issue 2748253005: Cleanup jobs which have failed. (Closed)
Patch Set: fix fake Created 3 years, 9 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_CHROMEOS_PRINTING_CUPS_PRINT_JOB_MANAGER_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_PRINTING_CUPS_PRINT_JOB_MANAGER_H_
6 #define CHROME_BROWSER_CHROMEOS_PRINTING_CUPS_PRINT_JOB_MANAGER_H_ 6 #define CHROME_BROWSER_CHROMEOS_PRINTING_CUPS_PRINT_JOB_MANAGER_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 46
47 static CupsPrintJobManager* CreateInstance(Profile* profile); 47 static CupsPrintJobManager* CreateInstance(Profile* profile);
48 48
49 explicit CupsPrintJobManager(Profile* profile); 49 explicit CupsPrintJobManager(Profile* profile);
50 ~CupsPrintJobManager() override; 50 ~CupsPrintJobManager() override;
51 51
52 // KeyedService override: 52 // KeyedService override:
53 void Shutdown() override; 53 void Shutdown() override;
54 54
55 // Cancel a print job |job|. Note the |job| will be deleted after cancelled. 55 // Cancel a print job |job|. Note the |job| will be deleted after cancelled.
56 virtual bool CancelPrintJob(CupsPrintJob* job) = 0; 56 // There will be no notifications after cancellation.
57 virtual void CancelPrintJob(CupsPrintJob* job) = 0;
57 virtual bool SuspendPrintJob(CupsPrintJob* job) = 0; 58 virtual bool SuspendPrintJob(CupsPrintJob* job) = 0;
58 virtual bool ResumePrintJob(CupsPrintJob* job) = 0; 59 virtual bool ResumePrintJob(CupsPrintJob* job) = 0;
59 60
60 void AddObserver(Observer* observer); 61 void AddObserver(Observer* observer);
61 void RemoveObserver(Observer* observer); 62 void RemoveObserver(Observer* observer);
62 63
63 protected: 64 protected:
64 void NotifyJobCreated(CupsPrintJob* job); 65 void NotifyJobCreated(CupsPrintJob* job);
65 void NotifyJobStarted(CupsPrintJob* job); 66 void NotifyJobStarted(CupsPrintJob* job);
66 void NotifyJobUpdated(CupsPrintJob* job); 67 void NotifyJobUpdated(CupsPrintJob* job);
67 void NotifyJobResumed(CupsPrintJob* job); 68 void NotifyJobResumed(CupsPrintJob* job);
68 void NotifyJobSuspended(CupsPrintJob* job); 69 void NotifyJobSuspended(CupsPrintJob* job);
69 void NotifyJobCanceled(CupsPrintJob* job); 70 void NotifyJobCanceled(CupsPrintJob* job);
70 void NotifyJobError(CupsPrintJob* job); 71 void NotifyJobError(CupsPrintJob* job);
71 void NotifyJobDone(CupsPrintJob* job); 72 void NotifyJobDone(CupsPrintJob* job);
72 73
73 Profile* profile_; 74 Profile* profile_;
74 std::unique_ptr<CupsPrintJobNotificationManager> notification_manager_; 75 std::unique_ptr<CupsPrintJobNotificationManager> notification_manager_;
75 base::ObserverList<Observer> observers_; 76 base::ObserverList<Observer> observers_;
76 77
77 private: 78 private:
78 DISALLOW_COPY_AND_ASSIGN(CupsPrintJobManager); 79 DISALLOW_COPY_AND_ASSIGN(CupsPrintJobManager);
79 }; 80 };
80 81
81 } // namespace chromeos 82 } // namespace chromeos
82 83
83 #endif // CHROME_BROWSER_CHROMEOS_PRINTING_CUPS_PRINT_JOB_MANAGER_H_ 84 #endif // CHROME_BROWSER_CHROMEOS_PRINTING_CUPS_PRINT_JOB_MANAGER_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/printing/cups_print_job.h ('k') | chrome/browser/chromeos/printing/cups_print_job_manager_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698