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

Side by Side Diff: chrome/browser/printing/cloud_print/privet_http_impl.h

Issue 1553333002: Move cloud print specific files out of local_discovery (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@moveprn
Patch Set: Created 4 years, 11 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
OLDNEW
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_PRINTING_CLOUD_PRINT_PRIVET_HTTP_IMPL_H_
6 #define CHROME_BROWSER_LOCAL_DISCOVERY_PRIVET_HTTP_IMPL_H_ 6 #define CHROME_BROWSER_PRINTING_CLOUD_PRINT_PRIVET_HTTP_IMPL_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/callback.h" 11 #include "base/callback.h"
12 #include "base/files/file_path.h" 12 #include "base/files/file_path.h"
13 #include "base/macros.h" 13 #include "base/macros.h"
14 #include "base/memory/ref_counted.h" 14 #include "base/memory/ref_counted.h"
15 #include "base/memory/weak_ptr.h" 15 #include "base/memory/weak_ptr.h"
16 #include "chrome/browser/local_discovery/privet_http.h" 16 #include "chrome/browser/printing/cloud_print/privet_http.h"
17 #include "components/cloud_devices/common/cloud_device_description.h" 17 #include "components/cloud_devices/common/cloud_device_description.h"
18 #include "ui/gfx/geometry/size.h" 18 #include "ui/gfx/geometry/size.h"
19 19
20 namespace local_discovery { 20 namespace cloud_print {
21 21
22 class PrivetHTTPClient; 22 class PrivetHTTPClient;
23 23
24 class PrivetInfoOperationImpl : public PrivetJSONOperation, 24 class PrivetInfoOperationImpl : public PrivetJSONOperation,
25 public PrivetURLFetcher::Delegate { 25 public PrivetURLFetcher::Delegate {
26 public: 26 public:
27 PrivetInfoOperationImpl(PrivetHTTPClient* privet_client, 27 PrivetInfoOperationImpl(PrivetHTTPClient* privet_client,
28 const PrivetJSONOperation::ResultCallback& callback); 28 const PrivetJSONOperation::ResultCallback& callback);
29 ~PrivetInfoOperationImpl() override; 29 ~PrivetInfoOperationImpl() override;
30 30
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 166
167 void SetUsername(const std::string& user) override; 167 void SetUsername(const std::string& user) override;
168 168
169 void SetJobname(const std::string& jobname) override; 169 void SetJobname(const std::string& jobname) override;
170 170
171 void SetOffline(bool offline) override; 171 void SetOffline(bool offline) override;
172 172
173 void SetPageSize(const gfx::Size& page_size) override; 173 void SetPageSize(const gfx::Size& page_size) override;
174 174
175 void SetPWGRasterConverterForTesting( 175 void SetPWGRasterConverterForTesting(
176 scoped_ptr<PWGRasterConverter> pwg_raster_converter) override; 176 scoped_ptr<printing::PWGRasterConverter> pwg_raster_converter) override;
177 177
178 PrivetHTTPClient* GetHTTPClient() override; 178 PrivetHTTPClient* GetHTTPClient() override;
179 179
180 void OnError(PrivetURLFetcher* fetcher, 180 void OnError(PrivetURLFetcher* fetcher,
181 PrivetURLFetcher::ErrorType error) override; 181 PrivetURLFetcher::ErrorType error) override;
182 void OnParsedJson(PrivetURLFetcher* fetcher, 182 void OnParsedJson(PrivetURLFetcher* fetcher,
183 const base::DictionaryValue& value, 183 const base::DictionaryValue& value,
184 bool has_error) override; 184 bool has_error) override;
185 void OnNeedPrivetToken( 185 void OnNeedPrivetToken(
186 PrivetURLFetcher* fetcher, 186 PrivetURLFetcher* fetcher,
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 223
224 std::string user_; 224 std::string user_;
225 std::string jobname_; 225 std::string jobname_;
226 226
227 std::string jobid_; 227 std::string jobid_;
228 228
229 int invalid_job_retries_; 229 int invalid_job_retries_;
230 230
231 scoped_ptr<PrivetURLFetcher> url_fetcher_; 231 scoped_ptr<PrivetURLFetcher> url_fetcher_;
232 scoped_ptr<PrivetJSONOperation> info_operation_; 232 scoped_ptr<PrivetJSONOperation> info_operation_;
233 scoped_ptr<PWGRasterConverter> pwg_raster_converter_; 233 scoped_ptr<printing::PWGRasterConverter> pwg_raster_converter_;
234 234
235 base::WeakPtrFactory<PrivetLocalPrintOperationImpl> weak_factory_; 235 base::WeakPtrFactory<PrivetLocalPrintOperationImpl> weak_factory_;
236 }; 236 };
237 #endif // ENABLE_PRINT_PREVIEW 237 #endif // ENABLE_PRINT_PREVIEW
238 238
239 class PrivetHTTPClientImpl : public PrivetHTTPClient { 239 class PrivetHTTPClientImpl : public PrivetHTTPClient {
240 public: 240 public:
241 PrivetHTTPClientImpl( 241 PrivetHTTPClientImpl(
242 const std::string& name, 242 const std::string& name,
243 const net::HostPortPair& host_port, 243 const net::HostPortPair& host_port,
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 PrivetLocalPrintOperation::Delegate* delegate) override; 287 PrivetLocalPrintOperation::Delegate* delegate) override;
288 288
289 private: 289 private:
290 PrivetHTTPClient* info_client() { return info_client_.get(); } 290 PrivetHTTPClient* info_client() { return info_client_.get(); }
291 291
292 scoped_ptr<PrivetHTTPClient> info_client_; 292 scoped_ptr<PrivetHTTPClient> info_client_;
293 293
294 DISALLOW_COPY_AND_ASSIGN(PrivetV1HTTPClientImpl); 294 DISALLOW_COPY_AND_ASSIGN(PrivetV1HTTPClientImpl);
295 }; 295 };
296 296
297 } // namespace local_discovery 297 } // namespace cloud_print
298 #endif // CHROME_BROWSER_LOCAL_DISCOVERY_PRIVET_HTTP_IMPL_H_ 298
299 #endif // CHROME_BROWSER_PRINTING_CLOUD_PRINT_PRIVET_HTTP_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698