summaryrefslogtreecommitdiffstats
path: root/chrome/browser/dom_ui/print_preview_handler.h
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2010-11-18 18:32:45 +0000
committerBen Murdoch <benm@google.com>2010-11-18 18:38:07 +0000
commit513209b27ff55e2841eac0e4120199c23acce758 (patch)
treeaeba30bb08c5f47c57003544e378a377c297eee6 /chrome/browser/dom_ui/print_preview_handler.h
parent164f7496de0fbee436b385a79ead9e3cb81a50c1 (diff)
downloadexternal_chromium-513209b27ff55e2841eac0e4120199c23acce758.zip
external_chromium-513209b27ff55e2841eac0e4120199c23acce758.tar.gz
external_chromium-513209b27ff55e2841eac0e4120199c23acce758.tar.bz2
Merge Chromium at r65505: Initial merge by git.
Change-Id: I31d8f1d8cd33caaf7f47ffa7350aef42d5fbdb45
Diffstat (limited to 'chrome/browser/dom_ui/print_preview_handler.h')
-rw-r--r--chrome/browser/dom_ui/print_preview_handler.h37
1 files changed, 37 insertions, 0 deletions
diff --git a/chrome/browser/dom_ui/print_preview_handler.h b/chrome/browser/dom_ui/print_preview_handler.h
new file mode 100644
index 0000000..edcb8e6
--- /dev/null
+++ b/chrome/browser/dom_ui/print_preview_handler.h
@@ -0,0 +1,37 @@
+// Copyright (c) 2010 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_DOM_UI_PRINT_PREVIEW_HANDLER_H_
+#define CHROME_BROWSER_DOM_UI_PRINT_PREVIEW_HANDLER_H_
+#pragma once
+
+#include "base/scoped_ptr.h"
+#include "base/weak_ptr.h"
+#include "chrome/browser/dom_ui/dom_ui.h"
+
+namespace printing {
+class PrintBackend;
+} // namespace printing
+
+// The handler for Javascript messages related to the "print preview" dialog.
+class PrintPreviewHandler : public DOMMessageHandler,
+ public base::SupportsWeakPtr<PrintPreviewHandler> {
+ public:
+ PrintPreviewHandler();
+ virtual ~PrintPreviewHandler();
+
+ // DOMMessageHandler implementation.
+ virtual void RegisterMessages();
+
+ private:
+ // Get the list of printers and send it to the DOM UI. |args| is unused.
+ void HandleGetPrinters(const ListValue* args);
+
+ // Pointer to current print system.
+ scoped_refptr<printing::PrintBackend> print_backend_;
+
+ DISALLOW_COPY_AND_ASSIGN(PrintPreviewHandler);
+};
+
+#endif // CHROME_BROWSER_DOM_UI_PRINT_PREVIEW_HANDLER_H_