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

Side by Side Diff: chrome/browser/ui/webui/print_preview/printer_capabilities.h

Issue 2457933004: Register and select printer on click. (Closed)
Patch Set: rebase Created 4 years, 1 month 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 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 CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINTER_CAPABILITIES_H_
6 #define CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINTER_CAPABILITIES_H_
7
8 #include <memory>
9 #include <string>
10 #include <utility>
11
12 #include "base/values.h"
13
14 namespace printing {
15
16 struct PrinterBasicInfo;
17
18 // Printer capability setting keys.
19 extern const char kPrinterId[];
20 extern const char kPrinterCapabilities[];
21
22 // Extracts the printer display name and description from the
23 // appropriate fields in |printer| for the platform.
24 std::pair<std::string, std::string> GetPrinterNameAndDescription(
25 const PrinterBasicInfo& printer);
26
27 // Returns the JSON representing printer capabilities for the device registered
28 // as |device_name| in the PrinterBackend. The returned dictionary is suitable
29 // for passage to the WebUI.
30 std::unique_ptr<base::DictionaryValue> GetSettingsDictionary(
31 const std::string& device_name,
32 const PrinterBasicInfo& basic_info);
33
34 } // namespace printing
35
36 #endif // CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINTER_CAPABILITIES_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698