Chromium Code Reviews| Index: chrome/browser/chromeos/printing/cups_print_job_notification_manager.h |
| diff --git a/chrome/browser/chromeos/printing/cups_print_job_notification_manager.h b/chrome/browser/chromeos/printing/cups_print_job_notification_manager.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..cbb7c7da1cd3a54894406109f247eca8dc791841 |
| --- /dev/null |
| +++ b/chrome/browser/chromeos/printing/cups_print_job_notification_manager.h |
| @@ -0,0 +1,48 @@ |
| +// Copyright 2016 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CHROME_BROWSER_CHROMEOS_PRINTING_CUPS_PRINT_JOB_NOTIFICATION_MANAGER_H_ |
| +#define CHROME_BROWSER_CHROMEOS_PRINTING_CUPS_PRINT_JOB_NOTIFICATION_MANAGER_H_ |
| + |
| +#include <memory> |
| +#include <string> |
| +#include <unordered_map> |
| + |
| +#include "chrome/browser/chromeos/printing/cups_print_job_manager.h" |
| +#include "chrome/browser/chromeos/printing/cups_print_job_notification.h" |
| + |
| +class Profile; |
| + |
| +namespace chromeos { |
| + |
| +class CUPSPrintJob; |
| + |
| +class CUPSPrintJobNotificationManager : public CUPSPrintJobManager::Observer { |
|
stevenjb
2016/10/26 19:59:58
CupsPrintJobNotificationManager
xdai1
2016/10/26 22:55:19
Done.
|
| + public: |
| + using PrintJobNotificationMap = |
| + std::unordered_map<CUPSPrintJob*, |
| + std::unique_ptr<CUPSPrintJobNotification>>; |
| + |
| + explicit CUPSPrintJobNotificationManager(Profile* profile); |
| + ~CUPSPrintJobNotificationManager() override; |
| + |
| + // CUPSPrintJobManager::Observer overrides: |
| + void OnPrintJobCreated(CUPSPrintJob* job) override; |
| + void OnPrintJobStarted(CUPSPrintJob* job) override; |
| + void OnPrintJobUpdated(CUPSPrintJob* job) override; |
| + void OnPrintJobSuspended(CUPSPrintJob* job) override; |
| + void OnPrintJobResumed(CUPSPrintJob* job) override; |
| + void OnPrintJobDone(CUPSPrintJob* job) override; |
| + void OnPrintJobError(CUPSPrintJob* job) override; |
| + |
| + private: |
| + PrintJobNotificationMap notification_map_; |
| + Profile* profile_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(CUPSPrintJobNotificationManager); |
| +}; |
| + |
| +} // namespace chromeos |
| + |
| +#endif // CHROME_BROWSER_CHROMEOS_PRINTING_CUPS_PRINT_JOB_NOTIFICATION_MANAGER_H_ |