[M120 Migration][VD] Remove accessing oom_score_adj in zygote process
[platform/framework/web/chromium-efl.git] / printing / printing_context_system_dialog_win.h
1 // Copyright 2014 The Chromium Authors
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 PRINTING_PRINTING_CONTEXT_SYSTEM_DIALOG_WIN_H_
6 #define PRINTING_PRINTING_CONTEXT_SYSTEM_DIALOG_WIN_H_
7
8 #include <ocidl.h>  // NOLINT(build/include_order)
9
10 #include <commdlg.h>  // Must come after ocidl.h.
11
12 #include <string>
13
14 #include "printing/mojom/print.mojom.h"
15 #include "printing/printing_context_win.h"
16 #include "ui/gfx/native_widget_types.h"
17
18 namespace printing {
19
20 class COMPONENT_EXPORT(PRINTING) PrintingContextSystemDialogWin
21     : public PrintingContextWin {
22  public:
23   explicit PrintingContextSystemDialogWin(Delegate* delegate);
24   PrintingContextSystemDialogWin(const PrintingContextSystemDialogWin&) =
25       delete;
26   PrintingContextSystemDialogWin& operator=(
27       const PrintingContextSystemDialogWin&) = delete;
28   ~PrintingContextSystemDialogWin() override;
29
30   // PrintingContext implementation.
31   void AskUserForSettings(int max_pages,
32                           bool has_selection,
33                           bool is_scripted,
34                           PrintSettingsCallback callback) override;
35
36  private:
37   friend class MockPrintingContextWin;
38
39   HWND GetWindow();
40
41   virtual HRESULT ShowPrintDialog(PRINTDLGEX* options);
42
43   // Reads the settings from the selected device context. Updates settings_ and
44   // its margins.
45   bool InitializeSettingsWithRanges(const DEVMODE& dev_mode,
46                                     const std::wstring& new_device_name,
47                                     const PRINTPAGERANGE* ranges,
48                                     int number_ranges,
49                                     bool selection_only);
50
51   // Parses the result of a PRINTDLGEX result.
52   mojom::ResultCode ParseDialogResultEx(const PRINTDLGEX& dialog_options);
53 };
54
55 }  // namespace printing
56
57 #endif  // PRINTING_PRINTING_CONTEXT_SYSTEM_DIALOG_WIN_H_