OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_SERVICE_CLOUD_PRINT_CLOUD_PRINT_CONNECTOR_H_ | 5 #ifndef CHROME_SERVICE_CLOUD_PRINT_CLOUD_PRINT_CONNECTOR_H_ |
6 #define CHROME_SERVICE_CLOUD_PRINT_CLOUD_PRINT_CONNECTOR_H_ | 6 #define CHROME_SERVICE_CLOUD_PRINT_CLOUD_PRINT_CONNECTOR_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <list> | 9 #include <list> |
10 #include <map> | 10 #include <map> |
(...skipping 12 matching lines...) Expand all Loading... |
23 // one-by-one in FIFO order. | 23 // one-by-one in FIFO order. |
24 // CloudPrintConnector will notify client over Client interface. | 24 // CloudPrintConnector will notify client over Client interface. |
25 class CloudPrintConnector | 25 class CloudPrintConnector |
26 : public base::RefCountedThreadSafe<CloudPrintConnector>, | 26 : public base::RefCountedThreadSafe<CloudPrintConnector>, |
27 public cloud_print::PrintServerWatcherDelegate, | 27 public cloud_print::PrintServerWatcherDelegate, |
28 public PrinterJobHandlerDelegate, | 28 public PrinterJobHandlerDelegate, |
29 public CloudPrintURLFetcherDelegate { | 29 public CloudPrintURLFetcherDelegate { |
30 public: | 30 public: |
31 class Client { | 31 class Client { |
32 public: | 32 public: |
33 virtual void OnPrintersAvailable(const printing::PrinterList& printers) = 0; | |
34 virtual void OnAuthFailed() = 0; | 33 virtual void OnAuthFailed() = 0; |
35 protected: | 34 protected: |
36 virtual ~Client() {} | 35 virtual ~Client() {} |
37 }; | 36 }; |
38 | 37 |
39 CloudPrintConnector(Client* client, | 38 CloudPrintConnector(Client* client, |
40 const std::string& proxy_id, | 39 const std::string& proxy_id, |
41 const GURL& cloud_print_server_url, | 40 const GURL& cloud_print_server_url, |
42 const DictionaryValue* print_system_settings); | 41 const DictionaryValue* print_system_settings); |
43 virtual ~CloudPrintConnector(); | 42 virtual ~CloudPrintConnector(); |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 // The CloudPrintURLFetcher instance for the current request. | 177 // The CloudPrintURLFetcher instance for the current request. |
179 scoped_refptr<CloudPrintURLFetcher> request_; | 178 scoped_refptr<CloudPrintURLFetcher> request_; |
180 // The CloudPrintURLFetcher instance for the user message request. | 179 // The CloudPrintURLFetcher instance for the user message request. |
181 scoped_refptr<CloudPrintURLFetcher> user_message_request_; | 180 scoped_refptr<CloudPrintURLFetcher> user_message_request_; |
182 | 181 |
183 DISALLOW_COPY_AND_ASSIGN(CloudPrintConnector); | 182 DISALLOW_COPY_AND_ASSIGN(CloudPrintConnector); |
184 }; | 183 }; |
185 | 184 |
186 #endif // CHROME_SERVICE_CLOUD_PRINT_CLOUD_PRINT_CONNECTOR_H_ | 185 #endif // CHROME_SERVICE_CLOUD_PRINT_CLOUD_PRINT_CONNECTOR_H_ |
187 | 186 |
OLD | NEW |