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

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

Issue 1153173002: Include USB printers in printer list as "provisional" devices. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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
1 // Copyright 2015 The Chromium Authors. All rights reserved. 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 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_HANDLER_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINTER_HANDLER_H_
6 #define CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINTER_HANDLER_H_ 6 #define CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINTER_HANDLER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 22 matching lines...) Expand all
33 class PrinterHandler { 33 class PrinterHandler {
34 public: 34 public:
35 using GetPrintersCallback = 35 using GetPrintersCallback =
36 base::Callback<void(const base::ListValue& printers, bool done)>; 36 base::Callback<void(const base::ListValue& printers, bool done)>;
37 using GetCapabilityCallback = 37 using GetCapabilityCallback =
38 base::Callback<void(const std::string& printer_id, 38 base::Callback<void(const std::string& printer_id,
39 const base::DictionaryValue& capability)>; 39 const base::DictionaryValue& capability)>;
40 using PrintCallback = 40 using PrintCallback =
41 base::Callback<void(bool success, const std::string& error)>; 41 base::Callback<void(bool success, const std::string& error)>;
42 42
43 // Creates an instance of an PrinterHandler for extension printers.
44 static scoped_ptr<PrinterHandler> CreateForExtensionPrinters(
45 content::BrowserContext* browser_context);
46
47 virtual ~PrinterHandler() {} 43 virtual ~PrinterHandler() {}
48 44
49 // Cancels all pending requests. 45 // Cancels all pending requests.
50 virtual void Reset() = 0; 46 virtual void Reset() = 0;
51 47
52 // Starts getting available printers. 48 // Starts getting available printers.
53 // |callback| should be called in the response to the request. 49 // |callback| should be called in the response to the request.
54 virtual void StartGetPrinters(const GetPrintersCallback& callback) = 0; 50 virtual void StartGetPrinters(const GetPrintersCallback& callback) = 0;
55 51
56 // Starts getting printing capability of the printer with the provided 52 // Starts getting printing capability of the printer with the provided
(...skipping 15 matching lines...) Expand all
72 const std::string& destination_id, 68 const std::string& destination_id,
73 const std::string& capability, 69 const std::string& capability,
74 const base::string16& job_title, 70 const base::string16& job_title,
75 const std::string& ticket_json, 71 const std::string& ticket_json,
76 const gfx::Size& page_size, 72 const gfx::Size& page_size,
77 const scoped_refptr<base::RefCountedMemory>& print_data, 73 const scoped_refptr<base::RefCountedMemory>& print_data,
78 const PrintCallback& callback) = 0; 74 const PrintCallback& callback) = 0;
79 }; 75 };
80 76
81 #endif // CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINTER_HANDLER_H_ 77 #endif // CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINTER_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698