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

Unified Diff: chrome/browser/ui/webui/print_preview/printer_capabilities.h

Issue 2457933004: Register and select printer on click. (Closed)
Patch Set: lint 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/webui/print_preview/printer_capabilities.h
diff --git a/chrome/browser/ui/webui/print_preview/printer_capabilities.h b/chrome/browser/ui/webui/print_preview/printer_capabilities.h
new file mode 100644
index 0000000000000000000000000000000000000000..06397c27087b279d4c267e29c2cd6828af1f45ea
--- /dev/null
+++ b/chrome/browser/ui/webui/print_preview/printer_capabilities.h
@@ -0,0 +1,36 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINTER_CAPABILITIES_H_
+#define CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINTER_CAPABILITIES_H_
+
+#include <memory>
+#include <string>
+#include <utility>
+
+#include "base/values.h"
+#include "printing/printing_export.h"
Lei Zhang 2016/11/02 23:09:22 Nothing is being exported here?
skau 2016/11/03 22:38:08 Done.
+
+namespace printing {
+
+struct PrinterBasicInfo;
+
+// Printer capability setting keys.
+extern const char kPrinterId[];
+extern const char kPrinterCapabilities[];
+
+// Extracts the printer display name and description from the
+// appropriate fields in |printer| for the platform.
+std::pair<std::string, std::string> GetPrinterNameAndDescription(
+ const PrinterBasicInfo& printer);
+
+// Constructs the JSON representing printer capabilities information suitable
+// for passing to the WebUI.
+std::unique_ptr<base::DictionaryValue> GetSettingsDictionary(
+ const std::string& device_name,
Lei Zhang 2016/11/02 23:09:22 Please explain what this is exactly, as PrinterBas
skau 2016/11/03 22:38:08 Done.
+ const PrinterBasicInfo& basic_info);
+
+} // namespace printing
+
+#endif // CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINTER_CAPABILITIES_H_

Powered by Google App Engine
This is Rietveld 408576698