blob: 006966fd1c588630f8a3d69fa524ac555d256418 [file] [log] [blame]
[email protected]a46cb3432014-06-18 12:05:091// Copyright 2014 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef CHROME_UTILITY_PRINTING_HANDLER_H_
6#define CHROME_UTILITY_PRINTING_HANDLER_H_
7
Jay Civelli80a982a2017-12-07 19:18:088#include <string>
9
[email protected]a46cb3432014-06-18 12:05:0910#include "base/macros.h"
avi2729e442015-12-26 05:27:4511#include "build/build_config.h"
Scott Violet318a55f2018-03-30 19:08:1912#include "printing/buildflags/buildflags.h"
[email protected]a46cb3432014-06-18 12:05:0913
Lei Zhang21b7a812018-02-12 23:17:4214#if !defined(OS_WIN) || !BUILDFLAG(ENABLE_PRINT_PREVIEW)
15#error "Windows printing and print preview must be enabled"
[email protected]a46cb3432014-06-18 12:05:0916#endif
17
Lei Zhang21b7a812018-02-12 23:17:4218namespace IPC {
19class Message;
20}
21
[email protected]a46cb3432014-06-18 12:05:0922namespace printing {
thestig45679652015-12-09 02:15:1923
[email protected]a46cb3432014-06-18 12:05:0924// Dispatches IPCs for printing.
Lei Zhang21b7a812018-02-12 23:17:4225class PrintingHandler {
[email protected]a46cb3432014-06-18 12:05:0926 public:
27 PrintingHandler();
Lei Zhang21b7a812018-02-12 23:17:4228 ~PrintingHandler();
[email protected]a46cb3432014-06-18 12:05:0929
Lei Zhang21b7a812018-02-12 23:17:4230 bool OnMessageReceived(const IPC::Message& message);
[email protected]a46cb3432014-06-18 12:05:0931
32 private:
33 // IPC message handlers.
[email protected]a46cb3432014-06-18 12:05:0934 void OnGetPrinterCapsAndDefaults(const std::string& printer_name);
35 void OnGetPrinterSemanticCapsAndDefaults(const std::string& printer_name);
[email protected]a46cb3432014-06-18 12:05:0936
[email protected]a46cb3432014-06-18 12:05:0937 DISALLOW_COPY_AND_ASSIGN(PrintingHandler);
38};
39
thestig45679652015-12-09 02:15:1940} // namespace printing
41
[email protected]a46cb3432014-06-18 12:05:0942#endif // CHROME_UTILITY_PRINTING_HANDLER_H_