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

Side by Side Diff: printing/printing_context_system_dialog_win.h

Issue 2114583002: Windows: Make it possible to print text with GDI. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 months 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef PRINTING_PRINTING_CONTEXT_SYSTEM_DIALOG_WIN_H_ 5 #ifndef PRINTING_PRINTING_CONTEXT_SYSTEM_DIALOG_WIN_H_
6 #define PRINTING_PRINTING_CONTEXT_SYSTEM_DIALOG_WIN_H_ 6 #define PRINTING_PRINTING_CONTEXT_SYSTEM_DIALOG_WIN_H_
7 7
8 #include <ocidl.h> 8 #include <ocidl.h>
9 #include <commdlg.h> 9 #include <commdlg.h>
10 10
11 #include <string> 11 #include <string>
12 12
13 #include "base/macros.h" 13 #include "base/macros.h"
14 #include "printing/printing_context_win.h" 14 #include "printing/printing_context_win.h"
15 #include "ui/gfx/native_widget_types.h" 15 #include "ui/gfx/native_widget_types.h"
16 16
17 namespace printing { 17 namespace printing {
18 18
19 class PRINTING_EXPORT PrintingContextSytemDialogWin 19 class PRINTING_EXPORT PrintingContextSystemDialogWin
20 : public PrintingContextWin { 20 : public PrintingContextWin {
21 public: 21 public:
22 explicit PrintingContextSytemDialogWin(Delegate* delegate); 22 explicit PrintingContextSystemDialogWin(Delegate* delegate);
23 ~PrintingContextSytemDialogWin() override; 23 ~PrintingContextSystemDialogWin() override;
24 24
25 // PrintingContext implementation. 25 // PrintingContext implementation.
26 void AskUserForSettings( 26 void AskUserForSettings(
27 int max_pages, 27 int max_pages,
28 bool has_selection, 28 bool has_selection,
29 bool is_scripted, 29 bool is_scripted,
30 const PrintSettingsCallback& callback) override; 30 const PrintSettingsCallback& callback) override;
31 31
32 private: 32 private:
33 friend class MockPrintingContextWin; 33 friend class MockPrintingContextWin;
34 34
35 virtual HRESULT ShowPrintDialog(PRINTDLGEX* options); 35 virtual HRESULT ShowPrintDialog(PRINTDLGEX* options);
36 36
37 // Reads the settings from the selected device context. Updates settings_ and 37 // Reads the settings from the selected device context. Updates settings_ and
38 // its margins. 38 // its margins.
39 bool InitializeSettingsWithRanges(const DEVMODE& dev_mode, 39 bool InitializeSettingsWithRanges(const DEVMODE& dev_mode,
40 const std::wstring& new_device_name, 40 const std::wstring& new_device_name,
41 const PRINTPAGERANGE* ranges, 41 const PRINTPAGERANGE* ranges,
42 int number_ranges, 42 int number_ranges,
43 bool selection_only); 43 bool selection_only);
44 44
45 // Parses the result of a PRINTDLGEX result. 45 // Parses the result of a PRINTDLGEX result.
46 Result ParseDialogResultEx(const PRINTDLGEX& dialog_options); 46 Result ParseDialogResultEx(const PRINTDLGEX& dialog_options);
47 Result ParseDialogResult(const PRINTDLG& dialog_options);
48 47
49 DISALLOW_COPY_AND_ASSIGN(PrintingContextSytemDialogWin); 48 DISALLOW_COPY_AND_ASSIGN(PrintingContextSystemDialogWin);
50 }; 49 };
51 50
52 } // namespace printing 51 } // namespace printing
53 52
54 #endif // PRINTING_PRINTING_CONTEXT_SYSTEM_DIALOG_WIN_H_ 53 #endif // PRINTING_PRINTING_CONTEXT_SYSTEM_DIALOG_WIN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698