OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_PRINTING_CLOUD_PRINT_CLOUD_PRINT_PROXY_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_PRINTING_CLOUD_PRINT_CLOUD_PRINT_PROXY_SERVICE_H_ |
6 #define CHROME_BROWSER_PRINTING_CLOUD_PRINT_CLOUD_PRINT_PROXY_SERVICE_H_ | 6 #define CHROME_BROWSER_PRINTING_CLOUD_PRINT_CLOUD_PRINT_PROXY_SERVICE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
12 #include "base/callback_forward.h" | 12 #include "base/callback_forward.h" |
13 #include "base/memory/weak_ptr.h" | 13 #include "base/memory/weak_ptr.h" |
14 #include "base/observer_list.h" | 14 #include "base/observer_list.h" |
15 #include "base/prefs/pref_change_registrar.h" | 15 #include "base/prefs/pref_change_registrar.h" |
16 #include "chrome/browser/printing/cloud_print/cloud_print_setup_handler.h" | 16 #include "chrome/browser/printing/cloud_print/cloud_print_setup_handler.h" |
17 #include "components/browser_context_keyed_service/browser_context_keyed_service
.h" | 17 #include "components/browser_context_keyed_service/browser_context_keyed_service
.h" |
18 | 18 |
19 class Profile; | 19 class Profile; |
20 class ServiceProcessControl; | 20 class ServiceProcessControl; |
21 | 21 |
22 namespace cloud_print { | 22 namespace cloud_print { |
23 struct CloudPrintProxyInfo; | 23 struct CloudPrintProxyInfo; |
24 } // namespace cloud_print | 24 } // namespace cloud_print |
25 | 25 |
26 // Layer between the browser user interface and the cloud print proxy code | 26 // Layer between the browser user interface and the cloud print proxy code |
27 // running in the service process. | 27 // running in the service process. |
28 class CloudPrintProxyService | 28 class CloudPrintProxyService |
29 : public CloudPrintSetupHandlerDelegate, | 29 : public CloudPrintSetupHandlerDelegate, |
30 public ProfileKeyedService { | 30 public BrowserContextKeyedService { |
31 public: | 31 public: |
32 explicit CloudPrintProxyService(Profile* profile); | 32 explicit CloudPrintProxyService(Profile* profile); |
33 virtual ~CloudPrintProxyService(); | 33 virtual ~CloudPrintProxyService(); |
34 | 34 |
35 // Initializes the object. This should be called every time an object of this | 35 // Initializes the object. This should be called every time an object of this |
36 // class is constructed. | 36 // class is constructed. |
37 void Initialize(); | 37 void Initialize(); |
38 | 38 |
39 // Enables/disables cloud printing for the user | 39 // Enables/disables cloud printing for the user |
40 virtual void EnableForUser(const std::string& lsid, const std::string& email); | 40 virtual void EnableForUser(const std::string& lsid, const std::string& email); |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 PrefChangeRegistrar pref_change_registrar_; | 103 PrefChangeRegistrar pref_change_registrar_; |
104 | 104 |
105 // If set, continue trying to disable the connector, and quit the process | 105 // If set, continue trying to disable the connector, and quit the process |
106 // once successful. | 106 // once successful. |
107 bool enforcing_connector_policy_; | 107 bool enforcing_connector_policy_; |
108 | 108 |
109 DISALLOW_COPY_AND_ASSIGN(CloudPrintProxyService); | 109 DISALLOW_COPY_AND_ASSIGN(CloudPrintProxyService); |
110 }; | 110 }; |
111 | 111 |
112 #endif // CHROME_BROWSER_PRINTING_CLOUD_PRINT_CLOUD_PRINT_PROXY_SERVICE_H_ | 112 #endif // CHROME_BROWSER_PRINTING_CLOUD_PRINT_CLOUD_PRINT_PROXY_SERVICE_H_ |
OLD | NEW |