OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2016 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 CHROMEOS_PRINTING_PRINTER_TRANSLATOR_H_ | |
6 #define CHROMEOS_PRINTING_PRINTER_TRANSLATOR_H_ | |
7 | |
8 #include <memory> | |
9 | |
10 #include "chromeos/printing/printer_configuration.h" | |
11 | |
12 namespace base { | |
13 class DictionaryValue; | |
14 } | |
15 | |
16 namespace chromeos { | |
17 namespace printing { | |
18 | |
19 extern const char kPrinterId[]; | |
20 | |
21 // Returns a new Printer populated with fields from |pref|. Returns a nullptr | |
22 // if |pref| does not contain an id field. | |
23 std::unique_ptr<Printer> PrefToPrinter(const base::DictionaryValue& pref); | |
24 | |
25 // Returns a dictionary genterated from the |printer| fields. | |
Lei Zhang
2016/08/02 20:52:41
Only gentlemen genterates? (typo)
skau
2016/08/02 21:16:00
lol. whoops.
| |
26 std::unique_ptr<base::DictionaryValue> PrinterToPref(const Printer& printer); | |
27 | |
28 } // namespace printing | |
29 } // namespace chromeos | |
30 | |
31 #endif // CHROMEOS_PRINTING_PRINTER_TRANSLATOR_H_ | |
OLD | NEW |