OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_SERVICE_CLOUD_PRINT_PRINTER_JOB_HANDLER_H_ | 5 #ifndef CHROME_SERVICE_CLOUD_PRINT_PRINTER_JOB_HANDLER_H_ |
6 #define CHROME_SERVICE_CLOUD_PRINT_PRINTER_JOB_HANDLER_H_ | 6 #define CHROME_SERVICE_CLOUD_PRINT_PRINTER_JOB_HANDLER_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 | 114 |
115 // Begin Delegate implementations | 115 // Begin Delegate implementations |
116 | 116 |
117 // CloudPrintURLFetcher::Delegate implementation. | 117 // CloudPrintURLFetcher::Delegate implementation. |
118 virtual CloudPrintURLFetcher::ResponseAction HandleRawResponse( | 118 virtual CloudPrintURLFetcher::ResponseAction HandleRawResponse( |
119 const net::URLFetcher* source, | 119 const net::URLFetcher* source, |
120 const GURL& url, | 120 const GURL& url, |
121 const net::URLRequestStatus& status, | 121 const net::URLRequestStatus& status, |
122 int response_code, | 122 int response_code, |
123 const net::ResponseCookies& cookies, | 123 const net::ResponseCookies& cookies, |
124 const std::string& data) OVERRIDE; | 124 const std::string& data) override; |
125 virtual CloudPrintURLFetcher::ResponseAction HandleRawData( | 125 virtual CloudPrintURLFetcher::ResponseAction HandleRawData( |
126 const net::URLFetcher* source, | 126 const net::URLFetcher* source, |
127 const GURL& url, | 127 const GURL& url, |
128 const std::string& data) OVERRIDE; | 128 const std::string& data) override; |
129 virtual CloudPrintURLFetcher::ResponseAction HandleJSONData( | 129 virtual CloudPrintURLFetcher::ResponseAction HandleJSONData( |
130 const net::URLFetcher* source, | 130 const net::URLFetcher* source, |
131 const GURL& url, | 131 const GURL& url, |
132 base::DictionaryValue* json_data, | 132 base::DictionaryValue* json_data, |
133 bool succeeded) OVERRIDE; | 133 bool succeeded) override; |
134 virtual void OnRequestGiveUp() OVERRIDE; | 134 virtual void OnRequestGiveUp() override; |
135 virtual CloudPrintURLFetcher::ResponseAction OnRequestAuthError() OVERRIDE; | 135 virtual CloudPrintURLFetcher::ResponseAction OnRequestAuthError() override; |
136 virtual std::string GetAuthHeader() OVERRIDE; | 136 virtual std::string GetAuthHeader() override; |
137 | 137 |
138 // JobStatusUpdater::Delegate implementation | 138 // JobStatusUpdater::Delegate implementation |
139 virtual bool OnJobCompleted(JobStatusUpdater* updater) OVERRIDE; | 139 virtual bool OnJobCompleted(JobStatusUpdater* updater) override; |
140 virtual void OnAuthError() OVERRIDE; | 140 virtual void OnAuthError() override; |
141 | 141 |
142 // PrinterWatcherDelegate implementation | 142 // PrinterWatcherDelegate implementation |
143 virtual void OnPrinterDeleted() OVERRIDE; | 143 virtual void OnPrinterDeleted() override; |
144 virtual void OnPrinterChanged() OVERRIDE; | 144 virtual void OnPrinterChanged() override; |
145 virtual void OnJobChanged() OVERRIDE; | 145 virtual void OnJobChanged() override; |
146 | 146 |
147 // JobSpoolerDelegate implementation. | 147 // JobSpoolerDelegate implementation. |
148 // Called on print_thread_. | 148 // Called on print_thread_. |
149 virtual void OnJobSpoolSucceeded(const PlatformJobId& job_id) OVERRIDE; | 149 virtual void OnJobSpoolSucceeded(const PlatformJobId& job_id) override; |
150 virtual void OnJobSpoolFailed() OVERRIDE; | 150 virtual void OnJobSpoolFailed() override; |
151 | 151 |
152 // End Delegate implementations | 152 // End Delegate implementations |
153 | 153 |
154 static void ReportsStats(); | 154 static void ReportsStats(); |
155 | 155 |
156 private: | 156 private: |
157 friend class base::RefCountedThreadSafe<PrinterJobHandler>; | 157 friend class base::RefCountedThreadSafe<PrinterJobHandler>; |
158 | 158 |
159 enum PrintJobError { | 159 enum PrintJobError { |
160 JOB_SUCCESS, | 160 JOB_SUCCESS, |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
315 | 315 |
316 // This typedef is to workaround the issue with certain versions of | 316 // This typedef is to workaround the issue with certain versions of |
317 // Visual Studio where it gets confused between multiple Delegate | 317 // Visual Studio where it gets confused between multiple Delegate |
318 // classes and gives a C2500 error. (I saw this error on the try bots - | 318 // classes and gives a C2500 error. (I saw this error on the try bots - |
319 // the workaround was not needed for my machine). | 319 // the workaround was not needed for my machine). |
320 typedef PrinterJobHandler::Delegate PrinterJobHandlerDelegate; | 320 typedef PrinterJobHandler::Delegate PrinterJobHandlerDelegate; |
321 | 321 |
322 } // namespace cloud_print | 322 } // namespace cloud_print |
323 | 323 |
324 #endif // CHROME_SERVICE_CLOUD_PRINT_PRINTER_JOB_HANDLER_H_ | 324 #endif // CHROME_SERVICE_CLOUD_PRINT_PRINTER_JOB_HANDLER_H_ |
OLD | NEW |