1 // 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.
5 #ifndef PRINTING_PRINTING_CONTEXT_SYSTEM_DIALOG_WIN_H_
6 #define PRINTING_PRINTING_CONTEXT_SYSTEM_DIALOG_WIN_H_
13 #include "base/macros.h"
14 #include "printing/printing_context_win.h"
15 #include "ui/gfx/native_widget_types.h"
19 class PRINTING_EXPORT PrintingContextSystemDialogWin
20 : public PrintingContextWin {
22 explicit PrintingContextSystemDialogWin(Delegate* delegate);
23 ~PrintingContextSystemDialogWin() override;
25 // PrintingContext implementation.
26 void AskUserForSettings(int max_pages,
29 PrintSettingsCallback callback) override;
32 friend class MockPrintingContextWin;
34 virtual HRESULT ShowPrintDialog(PRINTDLGEX* options);
36 // Reads the settings from the selected device context. Updates settings_ and
38 bool InitializeSettingsWithRanges(const DEVMODE& dev_mode,
39 const std::wstring& new_device_name,
40 const PRINTPAGERANGE* ranges,
44 // Parses the result of a PRINTDLGEX result.
45 Result ParseDialogResultEx(const PRINTDLGEX& dialog_options);
47 DISALLOW_COPY_AND_ASSIGN(PrintingContextSystemDialogWin);
50 } // namespace printing
52 #endif // PRINTING_PRINTING_CONTEXT_SYSTEM_DIALOG_WIN_H_