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

Side by Side Diff: chrome/browser/ui/webui/print_preview/printer_backend_proxy.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
1 // Copyright 2016 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINTER_BACKEND_PROXY_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINTER_BACKEND_PROXY_H_
6 #define CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINTER_BACKEND_PROXY_H_ 6 #define CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINTER_BACKEND_PROXY_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
11 #include "base/callback_forward.h" 11 #include "base/callback_forward.h"
12 #include "base/values.h" 12 #include "base/values.h"
13 #include "printing/backend/print_backend.h" 13 #include "printing/backend/print_backend.h"
14 14
15 class Profile; 15 class Profile;
16 16
17 namespace printing { 17 namespace printing {
18 18
19 using EnumeratePrintersCallback = base::Callback<void(const PrinterList&)>; 19 using EnumeratePrintersCallback = base::Callback<void(const PrinterList&)>;
20 20
21 using PrinterSetupCallback =
22 base::Callback<void(std::unique_ptr<base::DictionaryValue>)>;
23
21 // Returns the name of the default printer. 24 // Returns the name of the default printer.
22 std::string GetDefaultPrinterOnBlockingPoolThread(); 25 std::string GetDefaultPrinterOnBlockingPoolThread();
23 26
24 // Retrieves printers for display in the print dialog and calls |cb| with the 27 // Retrieves printers for display in the print dialog and calls |cb| with the
25 // list. This method expects to be called on the UI thread. 28 // list. This method expects to be called on the UI thread.
26 void EnumeratePrinters(Profile* profile, const EnumeratePrintersCallback& cb); 29 void EnumeratePrinters(Profile* profile, const EnumeratePrintersCallback& cb);
27 30
31 // Verifies printer setup if needed then retrieves printer capabilities for
32 // |printer_name|. |cb| is called with the capabilities dictionary or nullptr
33 // if one of the steps failed.
34 void ConfigurePrinterAndFetchCapabilities(Profile* profile,
35 const std::string& printer_name,
36 const PrinterSetupCallback& cb);
37
28 } // namespace printing 38 } // namespace printing
29 39
30 #endif // CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINTER_BACKEND_PROXY_H_ 40 #endif // CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINTER_BACKEND_PROXY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698