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

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

Issue 2542363002: Interrogate PpdProvider from PrintPreview. (Closed)
Patch Set: address comment from dpapad@ Created 4 years 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/print_preview_handler.h
diff --git a/chrome/browser/ui/webui/print_preview/print_preview_handler.h b/chrome/browser/ui/webui/print_preview/print_preview_handler.h
index 42a8f52ce91d862e6cb77fa45ff6636412f7eea0..56a737952dbf7504e6114e8e2d6f6068d083e812 100644
--- a/chrome/browser/ui/webui/print_preview/print_preview_handler.h
+++ b/chrome/browser/ui/webui/print_preview/print_preview_handler.h
@@ -41,6 +41,10 @@ namespace gfx {
class Size;
}
+namespace printing {
+class PrinterBackendProxy;
+}
+
// The handler for Javascript messages related to the print preview dialog.
class PrintPreviewHandler
: public content::WebUIMessageHandler,
@@ -111,6 +115,8 @@ class PrintPreviewHandler
PrintPreviewUI* print_preview_ui() const;
+ printing::PrinterBackendProxy* printer_backend_proxy();
+
// Gets the list of printers. |args| is unused.
void HandleGetPrinters(const base::ListValue* args);
@@ -380,6 +386,10 @@ class PrintPreviewHandler
// notify the test if it was a successful save, only that it was attempted.
base::Closure pdf_file_saved_closure_;
+ // Proxy for calls to the print backend. Lazily initialized since web_ui() is
+ // not available at construction time.
+ std::unique_ptr<printing::PrinterBackendProxy> printer_backend_proxy_;
+
base::WeakPtrFactory<PrintPreviewHandler> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(PrintPreviewHandler);

Powered by Google App Engine
This is Rietveld 408576698