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

Unified Diff: chrome/browser/chromeos/printing/cups_print_job_notification_manager.h

Issue 2435303003: [CUPS] Implement the Print Job notification. (Closed)
Patch Set: Bug fix. Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
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_

Powered by Google App Engine
This is Rietveld 408576698