summaryrefslogtreecommitdiffstats
path: root/printing/page_size_margins.h
blob: b6913724a90bb233583b49750a5a34074ca84790 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef PRINTING_PAGE_SIZE_MARGINS_H_
#define PRINTING_PAGE_SIZE_MARGINS_H_

#include "printing/printing_export.h"

namespace base {
class DictionaryValue;
}

namespace printing {

// Struct that holds margin and content area sizes of a page. Units are
// arbitrary and can be chosen by the programmer.
struct PageSizeMargins {
  double content_width;
  double content_height;
  double margin_top;
  double margin_right;
  double margin_bottom;
  double margin_left;
};

PRINTING_EXPORT void GetCustomMarginsFromJobSettings(
    const base::DictionaryValue& settings, PageSizeMargins* page_size_margins);

}  // namespace printing

#endif  // PRINTING_PAGE_SIZE_MARGINS_H_