OLD | NEW |
(Empty) | |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_CHROME_TO_MOBILE_COMMON_CLOUD_PRINT_REQUEST_FACTORY_H_ |
| 6 #define CHROME_BROWSER_CHROME_TO_MOBILE_COMMON_CLOUD_PRINT_REQUEST_FACTORY_H_ |
| 7 |
| 8 #include <string> |
| 9 |
| 10 #include "chrome/browser/chrome_to_mobile/common/cloud_print_request.h" |
| 11 #include "googleurl/src/gurl.h" |
| 12 |
| 13 namespace chrome_to_mobile { |
| 14 |
| 15 // |CloudPrintRequestFactory| is intended for testing. |
| 16 // |CloudPrintRequest::CreateAndStart()| uses the currently registered Factory |
| 17 // to create requests if there is any. Otherwise it creates |
| 18 // |CloudPrintRequestImpl|s. |
| 19 class CloudPrintRequestFactory { |
| 20 public: |
| 21 virtual CloudPrintRequest* CreateAndStart( |
| 22 const GURL& url, |
| 23 const std::string& additional_header, |
| 24 const net::URLFetcher::RequestType& request_type, |
| 25 const std::string& post_data_mime_type, |
| 26 const std::string& post_data, |
| 27 const CloudPrintRequest::Settings& settings, |
| 28 CloudPrintRequest::Delegate* delegate) = 0; |
| 29 |
| 30 protected: |
| 31 virtual ~CloudPrintRequestFactory() {} |
| 32 }; |
| 33 |
| 34 } // namespace chrome_to_mobile |
| 35 |
| 36 #endif // CHROME_BROWSER_CHROME_TO_MOBILE_COMMON_CLOUD_PRINT_REQUEST_FACTORY_H_ |
OLD | NEW |