Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / public / web / WebPrintPresetOptions.h
blob7c7506c3dc776f894b8db102a53ecc6e82232864
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 WebPrintPresetOptions_h
6 #define WebPrintPresetOptions_h
8 #include <vector>
10 namespace blink {
12 struct WebPageRange;
13 typedef std::vector<WebPageRange> WebPageRanges;
15 enum WebDuplexMode {
16 WebUnknownDuplexMode = -1,
17 WebSimplex,
18 WebLongEdge,
19 WebShortEdge
22 struct WebPageRange {
23 int from;
24 int to;
27 struct WebPrintPresetOptions {
28 WebPrintPresetOptions()
29 : isScalingDisabled(false)
30 , copies(0)
31 , duplexMode(WebUnknownDuplexMode) { }
33 // Specifies whether scaling is disabled.
34 bool isScalingDisabled;
36 // Specifies the number of copies to be printed.
37 int copies;
39 // Specifies duplex mode to be used for printing.
40 WebDuplexMode duplexMode;
42 // Specifies page range to be used for printing.
43 WebPageRanges pageRanges;
45 // True if all the pages in the PDF are the same size.
46 bool isPageSizeUniform;
48 // Only valid if the page sizes are uniform. The page size in points.
49 WebSize uniformPageSize;
52 } // namespace blink
54 #endif