| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_PROXY_BACKEND_H_ | 5 #ifndef CHROME_SERVICE_CLOUD_PRINT_CLOUD_PRINT_PROXY_BACKEND_H_ |
| 6 #define CHROME_SERVICE_CLOUD_PRINT_CLOUD_PRINT_PROXY_BACKEND_H_ | 6 #define CHROME_SERVICE_CLOUD_PRINT_CLOUD_PRINT_PROXY_BACKEND_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 // There is a list of printers available that can be registered. | 27 // There is a list of printers available that can be registered. |
| 28 virtual void OnPrinterListAvailable( | 28 virtual void OnPrinterListAvailable( |
| 29 const printing::PrinterList& printer_list) = 0; | 29 const printing::PrinterList& printer_list) = 0; |
| 30 // We successfully authenticated with the cloud print server. This callback | 30 // We successfully authenticated with the cloud print server. This callback |
| 31 // allows the frontend to persist the tokens. | 31 // allows the frontend to persist the tokens. |
| 32 virtual void OnAuthenticated(const std::string& cloud_print_token, | 32 virtual void OnAuthenticated(const std::string& cloud_print_token, |
| 33 const std::string& cloud_print_xmpp_token, | 33 const std::string& cloud_print_xmpp_token, |
| 34 const std::string& email) = 0; | 34 const std::string& email) = 0; |
| 35 // We have invalid/expired credentials. | 35 // We have invalid/expired credentials. |
| 36 virtual void OnAuthenticationFailed() = 0; | 36 virtual void OnAuthenticationFailed() = 0; |
| 37 // The print system could not be initialized. |
| 38 virtual void OnPrintSystemUnavailable() = 0; |
| 37 | 39 |
| 38 protected: | 40 protected: |
| 39 // Don't delete through SyncFrontend interface. | 41 // Don't delete through SyncFrontend interface. |
| 40 virtual ~CloudPrintProxyFrontend() { | 42 virtual ~CloudPrintProxyFrontend() { |
| 41 } | 43 } |
| 42 private: | 44 private: |
| 43 DISALLOW_COPY_AND_ASSIGN(CloudPrintProxyFrontend); | 45 DISALLOW_COPY_AND_ASSIGN(CloudPrintProxyFrontend); |
| 44 }; | 46 }; |
| 45 | 47 |
| 46 class CloudPrintProxyBackend { | 48 class CloudPrintProxyBackend { |
| (...skipping 27 matching lines...) Expand all Loading... |
| 74 MessageLoop* const frontend_loop_; | 76 MessageLoop* const frontend_loop_; |
| 75 // The frontend which is responsible for displaying UI and updating Prefs | 77 // The frontend which is responsible for displaying UI and updating Prefs |
| 76 CloudPrintProxyFrontend* frontend_; | 78 CloudPrintProxyFrontend* frontend_; |
| 77 | 79 |
| 78 friend class base::RefCountedThreadSafe<CloudPrintProxyBackend::Core>; | 80 friend class base::RefCountedThreadSafe<CloudPrintProxyBackend::Core>; |
| 79 | 81 |
| 80 DISALLOW_COPY_AND_ASSIGN(CloudPrintProxyBackend); | 82 DISALLOW_COPY_AND_ASSIGN(CloudPrintProxyBackend); |
| 81 }; | 83 }; |
| 82 | 84 |
| 83 #endif // CHROME_SERVICE_CLOUD_PRINT_CLOUD_PRINT_PROXY_BACKEND_H_ | 85 #endif // CHROME_SERVICE_CLOUD_PRINT_CLOUD_PRINT_PROXY_BACKEND_H_ |
| OLD | NEW |