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

Side by Side Diff: chrome/browser/printing/cloud_print/cloud_print_proxy_service.h

Issue 1566047: First cut of Cloud Print Proxy implementation. The code is not enabled for no... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Final review changes Created 10 years, 8 months 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
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_PRINTING_CLOUD_PRINT_CLOUD_PRINT_PROXY_SERVICE_H_
6 #define CHROME_BROWSER_PRINTING_CLOUD_PRINT_CLOUD_PRINT_PROXY_SERVICE_H_
7
8 #include <string>
9 #include <map>
10 #include <vector>
11
12 #include "base/basictypes.h"
13 #include "base/file_path.h"
14 #include "base/observer_list.h"
15 #include "base/scoped_ptr.h"
16 #include "chrome/browser/profile.h"
17
18 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_backend.h"
19
20 class Profile;
21
22 // Layer between the browser user interface and the cloud print proxy backend.
23 class CloudPrintProxyService : public CloudPrintProxyFrontend {
24 public:
25 explicit CloudPrintProxyService(Profile* profile);
26 virtual ~CloudPrintProxyService();
27
28 // Initializes the object. This should be called every time an object of this
29 // class is constructed.
30 void Initialize();
31
32 // Enables/disables cloud printing for the user
33 virtual void EnableForUser(const std::string& auth_token);
34 virtual void DisableForUser();
35 // Notification received from the server for a particular printer.
36 // We need to inform the backend to look for jobs for this printer.
37 void HandlePrinterNotification(const std::string& printer_id);
38
39 // Notification methods from the backend. Called on UI thread.
40 void OnPrinterListAvailable(const cloud_print::PrinterList& printer_list);
41
42 // Called when authentication is done. Called on UI thread.
43 // Note that sid can be empty. This is placeholder code until we can get
44 // common GAIA signin code in place.
45 // TODO(sanjeevr): Remove this.
46 static void OnAuthenticated(const std::string& auth_token);
47
48 protected:
49 void Shutdown();
50
51 // Our asynchronous backend to communicate with sync components living on
52 // other threads.
53 scoped_ptr<CloudPrintProxyBackend> backend_;
54
55 DISALLOW_COPY_AND_ASSIGN(CloudPrintProxyService);
56 };
57
58 #endif // CHROME_BROWSER_PRINTING_CLOUD_PRINT_CLOUD_PRINT_PROXY_SERVICE_H_
59
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698