| OLD | NEW |
| (Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_CHROMEOS_PRINTING_CUPS_PRINT_JOB_NOTIFICATION_MANAGER_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_PRINTING_CUPS_PRINT_JOB_NOTIFICATION_MANAGER_H_ |
| 7 |
| 8 #include <memory> |
| 9 #include <string> |
| 10 #include <unordered_map> |
| 11 |
| 12 #include "chrome/browser/chromeos/printing/cups_print_job_manager.h" |
| 13 #include "chrome/browser/chromeos/printing/cups_print_job_notification.h" |
| 14 |
| 15 class Profile; |
| 16 |
| 17 namespace chromeos { |
| 18 |
| 19 class CupsPrintJob; |
| 20 |
| 21 class CupsPrintJobNotificationManager : public CupsPrintJobManager::Observer { |
| 22 public: |
| 23 using PrintJobNotificationMap = |
| 24 std::unordered_map<CupsPrintJob*, |
| 25 std::unique_ptr<CupsPrintJobNotification>>; |
| 26 |
| 27 CupsPrintJobNotificationManager(Profile* profile, |
| 28 CupsPrintJobManager* print_job_manager); |
| 29 ~CupsPrintJobNotificationManager() override; |
| 30 |
| 31 // CupsPrintJobManager::Observer overrides: |
| 32 void OnPrintJobCreated(CupsPrintJob* job) override; |
| 33 void OnPrintJobStarted(CupsPrintJob* job) override; |
| 34 void OnPrintJobUpdated(CupsPrintJob* job) override; |
| 35 void OnPrintJobSuspended(CupsPrintJob* job) override; |
| 36 void OnPrintJobResumed(CupsPrintJob* job) override; |
| 37 void OnPrintJobDone(CupsPrintJob* job) override; |
| 38 void OnPrintJobError(CupsPrintJob* job) override; |
| 39 |
| 40 private: |
| 41 PrintJobNotificationMap notification_map_; |
| 42 CupsPrintJobManager* print_job_manager_; |
| 43 Profile* profile_; |
| 44 |
| 45 DISALLOW_COPY_AND_ASSIGN(CupsPrintJobNotificationManager); |
| 46 }; |
| 47 |
| 48 } // namespace chromeos |
| 49 |
| 50 #endif // CHROME_BROWSER_CHROMEOS_PRINTING_CUPS_PRINT_JOB_NOTIFICATION_MANAGER_
H_ |
| OLD | NEW |