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

Side by Side Diff: extensions/common/api/printer_provider/usb_printer_manifest_data.h

Issue 1123093003: Add a manifest property declaring USB printers supported by an app. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix interfaceProtocol documentation. Created 5 years, 7 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
OLDNEW
(Empty)
1 // Copyright 2015 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 EXTENSIONS_COMMON_API_PRINTER_PROVIDER_USB_PRINTER_MANIFEST_DATA_H_
6 #define EXTENSIONS_COMMON_API_PRINTER_PROVIDER_USB_PRINTER_MANIFEST_DATA_H_
7
8 #include <vector>
9
10 #include "extensions/common/extension.h"
11
12 namespace device {
13 class UsbDeviceFilter;
14 }
15
16 namespace extensions {
17
18 // The parsed form of the "usb_printers" manifest entry.
19 class UsbPrinterManifestData : public Extension::ManifestData {
20 public:
21 UsbPrinterManifestData();
22 ~UsbPrinterManifestData() override;
23
24 // Gets the UsbPrinterManifestData for |extension|, or NULL if none was
25 // specified.
26 static const UsbPrinterManifestData* Get(const Extension* extension);
27
28 // Parses the data stored in |value|. Sets |error| and returns an empty
29 // scoped_ptr on failure.
30 static scoped_ptr<UsbPrinterManifestData> FromValue(const base::Value& value,
31 base::string16* error);
32
33 const std::vector<device::UsbDeviceFilter>& filters() const {
34 return filters_;
35 }
36
37 private:
38 std::vector<device::UsbDeviceFilter> filters_;
39 };
40
41 } // namespace extensions
42
43 #endif // EXTENSIONS_COMMON_API_PRINTER_PROVIDER_USB_PRINTER_MANIFEST_DATA_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698