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

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

Issue 2919693002: Print Preview: Change getPrinters to cr.sendWithPromise (Closed)
Patch Set: Address comments Created 3 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_PRINT_PREVIEW_HANDLER_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINT_PREVIEW_HANDLER_H_
6 #define CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINT_PREVIEW_HANDLER_H_ 6 #define CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINT_PREVIEW_HANDLER_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 const std::string& printer_name, 235 const std::string& printer_name,
236 std::unique_ptr<base::DictionaryValue> settings_info); 236 std::unique_ptr<base::DictionaryValue> settings_info);
237 237
238 // Send the result of performing printer setup. |settings_info| contains 238 // Send the result of performing printer setup. |settings_info| contains
239 // printer capabilities. 239 // printer capabilities.
240 void SendPrinterSetup(const std::string& callback_id, 240 void SendPrinterSetup(const std::string& callback_id,
241 const std::string& printer_name, 241 const std::string& printer_name,
242 std::unique_ptr<base::DictionaryValue> settings_info); 242 std::unique_ptr<base::DictionaryValue> settings_info);
243 243
244 // Send the list of printers to the Web UI. 244 // Send the list of printers to the Web UI.
245 void SetupPrinterList(const printing::PrinterList& printer_list); 245 void SetupPrinterList(const std::string& callback_id,
246 const printing::PrinterList& printer_list);
246 247
247 // Send whether cloud print integration should be enabled. 248 // Send whether cloud print integration should be enabled.
248 void SendCloudPrintEnabled(); 249 void SendCloudPrintEnabled();
249 250
250 // Send the PDF data to the cloud to print. 251 // Send the PDF data to the cloud to print.
251 void SendCloudPrintJob(const base::RefCountedBytes* data); 252 void SendCloudPrintJob(const base::RefCountedBytes* data);
252 253
253 // Gets the initiator for the print preview dialog. 254 // Gets the initiator for the print preview dialog.
254 content::WebContents* GetInitiator() const; 255 content::WebContents* GetInitiator() const;
255 256
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
401 // Proxy for calls to the print backend. Lazily initialized since web_ui() is 402 // Proxy for calls to the print backend. Lazily initialized since web_ui() is
402 // not available at construction time. 403 // not available at construction time.
403 std::unique_ptr<printing::PrinterBackendProxy> printer_backend_proxy_; 404 std::unique_ptr<printing::PrinterBackendProxy> printer_backend_proxy_;
404 405
405 base::WeakPtrFactory<PrintPreviewHandler> weak_factory_; 406 base::WeakPtrFactory<PrintPreviewHandler> weak_factory_;
406 407
407 DISALLOW_COPY_AND_ASSIGN(PrintPreviewHandler); 408 DISALLOW_COPY_AND_ASSIGN(PrintPreviewHandler);
408 }; 409 };
409 410
410 #endif // CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINT_PREVIEW_HANDLER_H_ 411 #endif // CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINT_PREVIEW_HANDLER_H_
OLDNEW
« no previous file with comments | « chrome/browser/resources/print_preview/native_layer.js ('k') | chrome/browser/ui/webui/print_preview/print_preview_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698