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 "printing/printing_context_win.h"
14 #include "ui/gfx/native_widget_types.h"
18 class PRINTING_EXPORT PrintingContextSytemDialogWin
19 : public PrintingContextWin
{
21 explicit PrintingContextSytemDialogWin(Delegate
* delegate
);
22 virtual ~PrintingContextSytemDialogWin();
24 // PrintingContext implementation.
25 virtual void AskUserForSettings(
29 const PrintSettingsCallback
& callback
) override
;
30 virtual void Cancel() override
;
33 friend class MockPrintingContextWin
;
35 virtual HRESULT
ShowPrintDialog(PRINTDLGEX
* options
);
37 // Reads the settings from the selected device context. Updates settings_ and
39 bool InitializeSettings(const DEVMODE
& dev_mode
,
40 const std::wstring
& new_device_name
,
41 const PRINTPAGERANGE
* ranges
,
45 // Parses the result of a PRINTDLGEX result.
46 Result
ParseDialogResultEx(const PRINTDLGEX
& dialog_options
);
47 Result
ParseDialogResult(const PRINTDLG
& dialog_options
);
49 // The dialog box for the time it is shown.
50 volatile HWND dialog_box_
;
52 DISALLOW_COPY_AND_ASSIGN(PrintingContextSytemDialogWin
);
55 } // namespace printing
57 #endif // PRINTING_PRINTING_CONTEXT_SYSTEM_DIALOG_WIN_H_