Index: chrome/browser/chrome_to_mobile/common/cloud_print_request_factory.h |
diff --git a/chrome/browser/chrome_to_mobile/common/cloud_print_request_factory.h b/chrome/browser/chrome_to_mobile/common/cloud_print_request_factory.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..9ed436bea1fbeeacdf61d93acc8b28ca7f4a9b36 |
--- /dev/null |
+++ b/chrome/browser/chrome_to_mobile/common/cloud_print_request_factory.h |
@@ -0,0 +1,36 @@ |
+// Copyright 2012 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CHROME_BROWSER_CHROME_TO_MOBILE_COMMON_CLOUD_PRINT_REQUEST_FACTORY_H_ |
+#define CHROME_BROWSER_CHROME_TO_MOBILE_COMMON_CLOUD_PRINT_REQUEST_FACTORY_H_ |
+ |
+#include <string> |
+ |
+#include "chrome/browser/chrome_to_mobile/common/cloud_print_request.h" |
+#include "googleurl/src/gurl.h" |
+ |
+namespace chrome_to_mobile { |
+ |
+// |CloudPrintRequestFactory| is intended for testing. |
+// |CloudPrintRequest::CreateAndStart()| uses the currently registered Factory |
+// to create requests if there is any. Otherwise it creates |
+// |CloudPrintRequestImpl|s. |
+class CloudPrintRequestFactory { |
+ public: |
+ virtual CloudPrintRequest* CreateAndStart( |
+ const GURL& url, |
+ const std::string& additional_header, |
+ const net::URLFetcher::RequestType& request_type, |
+ const std::string& post_data_mime_type, |
+ const std::string& post_data, |
+ const CloudPrintRequest::Settings& settings, |
+ CloudPrintRequest::Delegate* delegate) = 0; |
+ |
+ protected: |
+ virtual ~CloudPrintRequestFactory() {} |
+}; |
+ |
+} // namespace chrome_to_mobile |
+ |
+#endif // CHROME_BROWSER_CHROME_TO_MOBILE_COMMON_CLOUD_PRINT_REQUEST_FACTORY_H_ |