Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(596)

Side by Side Diff: chrome/service/cloud_print/cloud_print_proxy.h

Issue 11360151: Move common cloud print methods from service/cloud_print to common/cloud_print. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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_SERVICE_CLOUD_PRINT_CLOUD_PRINT_PROXY_H_ 5 #ifndef CHROME_SERVICE_CLOUD_PRINT_CLOUD_PRINT_PROXY_H_
6 #define CHROME_SERVICE_CLOUD_PRINT_CLOUD_PRINT_PROXY_H_ 6 #define CHROME_SERVICE_CLOUD_PRINT_CLOUD_PRINT_PROXY_H_
7 7
8 #include <list> 8 #include <list>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/basictypes.h" 12 #include "base/basictypes.h"
13 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
14 #include "base/threading/non_thread_safe.h" 14 #include "base/threading/non_thread_safe.h"
15 #include "chrome/service/cloud_print/cloud_print_proxy_backend.h" 15 #include "chrome/service/cloud_print/cloud_print_proxy_backend.h"
16 #include "chrome/service/cloud_print/cloud_print_wipeout.h" 16 #include "chrome/service/cloud_print/cloud_print_wipeout.h"
17 17
18 class ServiceProcessPrefs; 18 class ServiceProcessPrefs;
19 19
20 namespace cloud_print { 20 namespace cloud_print {
21
21 struct CloudPrintProxyInfo; 22 struct CloudPrintProxyInfo;
22 } // namespace cloud_print
23 23
24 // CloudPrintProxy is the layer between the service process UI thread 24 // CloudPrintProxy is the layer between the service process UI thread
25 // and the cloud print proxy backend. 25 // and the cloud print proxy backend.
26 class CloudPrintProxy : public CloudPrintProxyFrontend, 26 class CloudPrintProxy : public CloudPrintProxyFrontend,
27 public CloudPrintWipeout::Client, 27 public CloudPrintWipeout::Client,
28 public base::NonThreadSafe { 28 public base::NonThreadSafe {
29 public: 29 public:
30 class Client { 30 class Client {
31 public: 31 public:
32 virtual ~Client() {} 32 virtual ~Client() {}
(...skipping 11 matching lines...) Expand all
44 void EnableForUser(const std::string& lsid); 44 void EnableForUser(const std::string& lsid);
45 void EnableForUserWithRobot( 45 void EnableForUserWithRobot(
46 const std::string& robot_auth_code, 46 const std::string& robot_auth_code,
47 const std::string& robot_email, 47 const std::string& robot_email,
48 const std::string& user_email, 48 const std::string& user_email,
49 bool connect_new_printers, 49 bool connect_new_printers,
50 const std::vector<std::string>& printer_blacklist); 50 const std::vector<std::string>& printer_blacklist);
51 void UnregisterPrintersAndDisableForUser(); 51 void UnregisterPrintersAndDisableForUser();
52 void DisableForUser(); 52 void DisableForUser();
53 // Returns the proxy info. 53 // Returns the proxy info.
54 void GetProxyInfo(cloud_print::CloudPrintProxyInfo* info); 54 void GetProxyInfo(CloudPrintProxyInfo* info);
55 55
56 // Launches a browser to see if the proxy policy has been set. 56 // Launches a browser to see if the proxy policy has been set.
57 void CheckCloudPrintProxyPolicy(); 57 void CheckCloudPrintProxyPolicy();
58 58
59 const std::string& user_email() const { 59 const std::string& user_email() const {
60 return user_email_; 60 return user_email_;
61 } 61 }
62 62
63 // CloudPrintProxyFrontend implementation. Called on UI thread. 63 // CloudPrintProxyFrontend implementation. Called on UI thread.
64 virtual void OnAuthenticated(const std::string& robot_oauth_refresh_token, 64 virtual void OnAuthenticated(const std::string& robot_oauth_refresh_token,
(...skipping 28 matching lines...) Expand all
93 // successful authentication with the Cloud Print service. 93 // successful authentication with the Cloud Print service.
94 bool enabled_; 94 bool enabled_;
95 // Connector settings. 95 // Connector settings.
96 ConnectorSettings settings_; 96 ConnectorSettings settings_;
97 // This is a cleanup class for unregistering printers on proxy disable. 97 // This is a cleanup class for unregistering printers on proxy disable.
98 scoped_ptr<CloudPrintWipeout> wipeout_; 98 scoped_ptr<CloudPrintWipeout> wipeout_;
99 99
100 DISALLOW_COPY_AND_ASSIGN(CloudPrintProxy); 100 DISALLOW_COPY_AND_ASSIGN(CloudPrintProxy);
101 }; 101 };
102 102
103 } // namespace cloud_print
104
103 #endif // CHROME_SERVICE_CLOUD_PRINT_CLOUD_PRINT_PROXY_H_ 105 #endif // CHROME_SERVICE_CLOUD_PRINT_CLOUD_PRINT_PROXY_H_
OLDNEW
« no previous file with comments | « chrome/service/cloud_print/cloud_print_helpers_unittest.cc ('k') | chrome/service/cloud_print/cloud_print_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698