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

Side by Side Diff: printing/printing_context.h

Issue 2692923006: Add job id to JobEventDetails. (Closed)
Patch Set: 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 | « chrome/browser/printing/print_job_worker.cc ('k') | printing/printing_context_chromeos.h » ('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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 PRINTING_PRINTING_CONTEXT_H_ 5 #ifndef PRINTING_PRINTING_CONTEXT_H_
6 #define PRINTING_PRINTING_CONTEXT_H_ 6 #define PRINTING_PRINTING_CONTEXT_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 // implement this method to create an object of their implementation. 118 // implement this method to create an object of their implementation.
119 static std::unique_ptr<PrintingContext> Create(Delegate* delegate); 119 static std::unique_ptr<PrintingContext> Create(Delegate* delegate);
120 120
121 void set_margin_type(MarginType type); 121 void set_margin_type(MarginType type);
122 void set_is_modifiable(bool is_modifiable); 122 void set_is_modifiable(bool is_modifiable);
123 123
124 const PrintSettings& settings() const { 124 const PrintSettings& settings() const {
125 return settings_; 125 return settings_;
126 } 126 }
127 127
128 int job_id() const { return job_id_; }
129
128 protected: 130 protected:
129 explicit PrintingContext(Delegate* delegate); 131 explicit PrintingContext(Delegate* delegate);
130 132
131 // Reinitializes the settings for object reuse. 133 // Reinitializes the settings for object reuse.
132 void ResetSettings(); 134 void ResetSettings();
133 135
134 // Does bookkeeping when an error occurs. 136 // Does bookkeeping when an error occurs.
135 PrintingContext::Result OnError(); 137 PrintingContext::Result OnError();
136 138
137 // Complete print context settings. 139 // Complete print context settings.
138 PrintSettings settings_; 140 PrintSettings settings_;
139 141
140 // Printing context delegate. 142 // Printing context delegate.
141 Delegate* delegate_; 143 Delegate* delegate_;
142 144
143 // Is a print job being done. 145 // Is a print job being done.
144 volatile bool in_print_job_; 146 volatile bool in_print_job_;
145 147
146 // Did the user cancel the print job. 148 // Did the user cancel the print job.
147 volatile bool abort_printing_; 149 volatile bool abort_printing_;
148 150
151 // The job id for the current job. The value is 0 if no jobs are active.
152 int job_id_;
153
149 private: 154 private:
150 DISALLOW_COPY_AND_ASSIGN(PrintingContext); 155 DISALLOW_COPY_AND_ASSIGN(PrintingContext);
151 }; 156 };
152 157
153 } // namespace printing 158 } // namespace printing
154 159
155 #endif // PRINTING_PRINTING_CONTEXT_H_ 160 #endif // PRINTING_PRINTING_CONTEXT_H_
OLDNEW
« no previous file with comments | « chrome/browser/printing/print_job_worker.cc ('k') | printing/printing_context_chromeos.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698