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

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

Issue 2708233006: Report print jobs that are aborted by CUPS as errors. (Closed)
Patch Set: better Created 3 years, 10 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
« no previous file with comments | « no previous file | chrome/browser/chromeos/printing/cups_print_job_notification.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_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>
xdai1 2017/02/24 23:31:52 Just curious: Normally I don't proactively add mor
skau 2017/02/25 00:16:06 It shows up as a linter warning when I run 'git cl
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
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);
xdai1 2017/02/24 23:31:52 Do you also need include "base/macros.h" since you
skau 2017/02/25 00:16:05 Done.
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_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/printing/cups_print_job_notification.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698