OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_LOCAL_DISCOVERY_PRIVET_HTTP_IMPL_H_ | 5 #ifndef CHROME_BROWSER_LOCAL_DISCOVERY_PRIVET_HTTP_IMPL_H_ |
6 #define CHROME_BROWSER_LOCAL_DISCOVERY_PRIVET_HTTP_IMPL_H_ | 6 #define CHROME_BROWSER_LOCAL_DISCOVERY_PRIVET_HTTP_IMPL_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
11 #include "base/file_util.h" | 11 #include "base/file_util.h" |
12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
13 #include "base/memory/weak_ptr.h" | 13 #include "base/memory/weak_ptr.h" |
14 #include "chrome/browser/local_discovery/privet_http.h" | 14 #include "chrome/browser/local_discovery/privet_http.h" |
| 15 #include "printing/pdf_render_settings.h" |
15 | 16 |
16 namespace local_discovery { | 17 namespace local_discovery { |
17 | 18 |
18 class PrivetHTTPClientImpl; | 19 class PrivetHTTPClientImpl; |
19 | 20 |
20 class PrivetInfoOperationImpl : public PrivetInfoOperation, | 21 class PrivetInfoOperationImpl : public PrivetInfoOperation, |
21 public PrivetURLFetcher::Delegate { | 22 public PrivetURLFetcher::Delegate { |
22 public: | 23 public: |
23 PrivetInfoOperationImpl(PrivetHTTPClientImpl* privet_client, | 24 PrivetInfoOperationImpl(PrivetHTTPClientImpl* privet_client, |
24 PrivetInfoOperation::Delegate* delegate); | 25 PrivetInfoOperation::Delegate* delegate); |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 virtual void Start() OVERRIDE; | 159 virtual void Start() OVERRIDE; |
159 | 160 |
160 virtual void SetData(base::RefCountedBytes* data) OVERRIDE; | 161 virtual void SetData(base::RefCountedBytes* data) OVERRIDE; |
161 | 162 |
162 virtual void SetTicket(const std::string& ticket) OVERRIDE; | 163 virtual void SetTicket(const std::string& ticket) OVERRIDE; |
163 | 164 |
164 virtual void SetUsername(const std::string& user) OVERRIDE; | 165 virtual void SetUsername(const std::string& user) OVERRIDE; |
165 | 166 |
166 virtual void SetJobname(const std::string& jobname) OVERRIDE; | 167 virtual void SetJobname(const std::string& jobname) OVERRIDE; |
167 | 168 |
168 virtual void SetOffline(bool offline) OVERRIDE; | 169 virtual void SetOffline(bool offline) OVERRIDE; |
| 170 |
| 171 virtual void SetConversionSettings( |
| 172 const printing::PdfRenderSettings& conversion_settings) OVERRIDE; |
169 | 173 |
170 virtual void SetPWGRasterConverterForTesting( | 174 virtual void SetPWGRasterConverterForTesting( |
171 scoped_ptr<PWGRasterConverter> pwg_raster_converter) OVERRIDE; | 175 scoped_ptr<PWGRasterConverter> pwg_raster_converter) OVERRIDE; |
172 | 176 |
173 virtual PrivetHTTPClient* GetHTTPClient() OVERRIDE; | 177 virtual PrivetHTTPClient* GetHTTPClient() OVERRIDE; |
174 | 178 |
175 virtual void OnError(PrivetURLFetcher* fetcher, | 179 virtual void OnError(PrivetURLFetcher* fetcher, |
176 PrivetURLFetcher::ErrorType error) OVERRIDE; | 180 PrivetURLFetcher::ErrorType error) OVERRIDE; |
177 virtual void OnParsedJson(PrivetURLFetcher* fetcher, | 181 virtual void OnParsedJson(PrivetURLFetcher* fetcher, |
178 const base::DictionaryValue* value, | 182 const base::DictionaryValue* value, |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 | 215 |
212 std::string ticket_; | 216 std::string ticket_; |
213 scoped_refptr<base::RefCountedBytes> data_; | 217 scoped_refptr<base::RefCountedBytes> data_; |
214 base::FilePath pwg_file_path_; | 218 base::FilePath pwg_file_path_; |
215 | 219 |
216 bool use_pdf_; | 220 bool use_pdf_; |
217 bool has_capabilities_; | 221 bool has_capabilities_; |
218 bool has_extended_workflow_; | 222 bool has_extended_workflow_; |
219 bool started_; | 223 bool started_; |
220 bool offline_; | 224 bool offline_; |
| 225 printing::PdfRenderSettings conversion_settings_; |
221 | 226 |
222 std::string user_; | 227 std::string user_; |
223 std::string jobname_; | 228 std::string jobname_; |
224 | 229 |
225 std::string jobid_; | 230 std::string jobid_; |
226 | 231 |
227 int invalid_job_retries_; | 232 int invalid_job_retries_; |
228 | 233 |
229 scoped_ptr<PrivetURLFetcher> url_fetcher_; | 234 scoped_ptr<PrivetURLFetcher> url_fetcher_; |
230 scoped_ptr<PrivetInfoOperation> info_operation_; | 235 scoped_ptr<PrivetInfoOperation> info_operation_; |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
281 PrivetURLFetcherFactory fetcher_factory_; | 286 PrivetURLFetcherFactory fetcher_factory_; |
282 net::HostPortPair host_port_; | 287 net::HostPortPair host_port_; |
283 scoped_ptr<base::DictionaryValue> cached_info_; | 288 scoped_ptr<base::DictionaryValue> cached_info_; |
284 | 289 |
285 scoped_ptr<PrivetInfoOperation> info_operation_; | 290 scoped_ptr<PrivetInfoOperation> info_operation_; |
286 TokenCallbackVector token_callbacks_; | 291 TokenCallbackVector token_callbacks_; |
287 }; | 292 }; |
288 | 293 |
289 } // namespace local_discovery | 294 } // namespace local_discovery |
290 #endif // CHROME_BROWSER_LOCAL_DISCOVERY_PRIVET_HTTP_IMPL_H_ | 295 #endif // CHROME_BROWSER_LOCAL_DISCOVERY_PRIVET_HTTP_IMPL_H_ |
OLD | NEW |