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

Side by Side Diff: chrome/browser/local_discovery/cloud_print_printer_list.h

Issue 1553333002: Move cloud print specific files out of local_discovery (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@moveprn
Patch Set: Created 4 years, 11 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
« no previous file with comments | « no previous file | chrome/browser/local_discovery/cloud_print_printer_list.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2013 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_LOCAL_DISCOVERY_CLOUD_PRINT_PRINTER_LIST_H_
6 #define CHROME_BROWSER_LOCAL_DISCOVERY_CLOUD_PRINT_PRINTER_LIST_H_
7
8 #include <string>
9 #include <vector>
10
11 #include "base/values.h"
12 #include "chrome/browser/local_discovery/gcd_api_flow.h"
13
14 namespace local_discovery {
15
16 class CloudPrintPrinterList : public CloudPrintApiFlowRequest {
17 public:
18 struct Device {
19 Device();
20 ~Device();
21
22 std::string id;
23 std::string display_name;
24 std::string description;
25 };
26 typedef std::vector<Device> DeviceList;
27
28 class Delegate {
29 public:
30 Delegate();
31 virtual ~Delegate();
32
33 virtual void OnDeviceListReady(const DeviceList& devices) = 0;
34 virtual void OnDeviceListUnavailable() = 0;
35 };
36
37 explicit CloudPrintPrinterList(Delegate* delegate);
38 ~CloudPrintPrinterList() override;
39
40 void OnGCDAPIFlowError(GCDApiFlow::Status status) override;
41
42 void OnGCDAPIFlowComplete(const base::DictionaryValue& value) override;
43
44 GURL GetURL() override;
45
46 private:
47 bool FillPrinterDetails(const base::DictionaryValue& printer_value,
48 Device* printer_details);
49
50 Delegate* delegate_;
51 };
52
53 } // namespace local_discovery
54
55 #endif // CHROME_BROWSER_LOCAL_DISCOVERY_CLOUD_PRINT_PRINTER_LIST_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/local_discovery/cloud_print_printer_list.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698