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_H_ | 5 #ifndef CHROME_BROWSER_LOCAL_DISCOVERY_PRIVET_HTTP_H_ |
6 #define CHROME_BROWSER_LOCAL_DISCOVERY_PRIVET_HTTP_H_ | 6 #define CHROME_BROWSER_LOCAL_DISCOVERY_PRIVET_HTTP_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 // Document page size. | 152 // Document page size. |
153 virtual void SetPageSize(const gfx::Size& page_size) = 0; | 153 virtual void SetPageSize(const gfx::Size& page_size) = 0; |
154 | 154 |
155 // For testing, inject an alternative PWG raster converter. | 155 // For testing, inject an alternative PWG raster converter. |
156 virtual void SetPWGRasterConverterForTesting( | 156 virtual void SetPWGRasterConverterForTesting( |
157 scoped_ptr<PWGRasterConverter> pwg_raster_converter) = 0; | 157 scoped_ptr<PWGRasterConverter> pwg_raster_converter) = 0; |
158 | 158 |
159 virtual PrivetHTTPClient* GetHTTPClient() = 0; | 159 virtual PrivetHTTPClient* GetHTTPClient() = 0; |
160 }; | 160 }; |
161 | 161 |
162 // Privet HTTP client. Must not outlive the operations it creates. | 162 // Privet HTTP client. Must outlive the operations it creates. |
163 class PrivetHTTPClient { | 163 class PrivetHTTPClient { |
164 public: | 164 public: |
165 virtual ~PrivetHTTPClient() {} | 165 virtual ~PrivetHTTPClient() {} |
166 | 166 |
167 // Creates operation to register local device using Privet v1 protocol. | 167 // Creates operation to register local device using Privet v1 protocol. |
168 virtual scoped_ptr<PrivetRegisterOperation> CreateRegisterOperation( | 168 virtual scoped_ptr<PrivetRegisterOperation> CreateRegisterOperation( |
169 const std::string& user, | 169 const std::string& user, |
170 PrivetRegisterOperation::Delegate* delegate) = 0; | 170 PrivetRegisterOperation::Delegate* delegate) = 0; |
171 | 171 |
172 // Creates operation to query basic information about local device. | 172 // Creates operation to query basic information about local device. |
(...skipping 17 matching lines...) Expand all Loading... |
190 virtual scoped_ptr<PrivetDataReadOperation> CreateStorageReadOperation( | 190 virtual scoped_ptr<PrivetDataReadOperation> CreateStorageReadOperation( |
191 const std::string& path, | 191 const std::string& path, |
192 const PrivetDataReadOperation::ResultCallback& callback) = 0; | 192 const PrivetDataReadOperation::ResultCallback& callback) = 0; |
193 | 193 |
194 // A name for the HTTP client, e.g. the device name for the privet device. | 194 // A name for the HTTP client, e.g. the device name for the privet device. |
195 virtual const std::string& GetName() = 0; | 195 virtual const std::string& GetName() = 0; |
196 }; | 196 }; |
197 | 197 |
198 } // namespace local_discovery | 198 } // namespace local_discovery |
199 #endif // CHROME_BROWSER_LOCAL_DISCOVERY_PRIVET_HTTP_H_ | 199 #endif // CHROME_BROWSER_LOCAL_DISCOVERY_PRIVET_HTTP_H_ |
OLD | NEW |