| OLD | NEW |
| 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_NOTIFICATION_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_PRINTING_CUPS_PRINT_JOB_NOTIFICATION_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_PRINTING_CUPS_PRINT_JOB_NOTIFICATION_H_ | 6 #define CHROME_BROWSER_CHROMEOS_PRINTING_CUPS_PRINT_JOB_NOTIFICATION_H_ |
| 7 | 7 |
| 8 #include <memory> |
| 9 #include <string> |
| 10 #include <vector> |
| 11 |
| 8 #include "chrome/browser/notifications/notification.h" | 12 #include "chrome/browser/notifications/notification.h" |
| 9 #include "chrome/browser/notifications/notification_delegate.h" | 13 #include "chrome/browser/notifications/notification_delegate.h" |
| 10 | 14 |
| 11 class Profile; | 15 class Profile; |
| 12 | 16 |
| 13 namespace chromeos { | 17 namespace chromeos { |
| 14 | 18 |
| 15 class CupsPrintJob; | 19 class CupsPrintJob; |
| 16 | 20 |
| 17 // CupsPrintJobNotification is used to update the notification of a print job | 21 // CupsPrintJobNotification is used to update the notification of a print job |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 std::string notification_id_; | 56 std::string notification_id_; |
| 53 CupsPrintJob* print_job_; | 57 CupsPrintJob* print_job_; |
| 54 scoped_refptr<NotificationDelegate> delegate_; | 58 scoped_refptr<NotificationDelegate> delegate_; |
| 55 Profile* profile_; | 59 Profile* profile_; |
| 56 | 60 |
| 57 // If the notification has been closed in the middle of printing or not. If it | 61 // If the notification has been closed in the middle of printing or not. If it |
| 58 // is true, then prevent the following print job progress update after close, | 62 // is true, then prevent the following print job progress update after close, |
| 59 // and only show the print job done or failed notification. | 63 // and only show the print job done or failed notification. |
| 60 bool closed_in_middle_ = false; | 64 bool closed_in_middle_ = false; |
| 61 | 65 |
| 66 // If this is true, the user cancelled the job using the cancel button and |
| 67 // should not be notified of events. |
| 68 bool cancelled_by_user_ = false; |
| 69 |
| 62 // Maintains a list of button actions according to the print job's current | 70 // Maintains a list of button actions according to the print job's current |
| 63 // status. | 71 // status. |
| 64 std::unique_ptr<std::vector<ButtonCommand>> button_commands_; | 72 std::unique_ptr<std::vector<ButtonCommand>> button_commands_; |
| 65 | 73 |
| 66 DISALLOW_COPY_AND_ASSIGN(CupsPrintJobNotification); | 74 DISALLOW_COPY_AND_ASSIGN(CupsPrintJobNotification); |
| 67 }; | 75 }; |
| 68 | 76 |
| 69 } // namespace chromeos | 77 } // namespace chromeos |
| 70 | 78 |
| 71 #endif // CHROME_BROWSER_CHROMEOS_PRINTING_CUPS_PRINT_JOB_NOTIFICATION_H_ | 79 #endif // CHROME_BROWSER_CHROMEOS_PRINTING_CUPS_PRINT_JOB_NOTIFICATION_H_ |
| OLD | NEW |