[M120 Migration][VD] Remove accessing oom_score_adj in zygote process
[platform/framework/web/chromium-efl.git] / printing / nup_parameters.h
1 // Copyright 2018 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_NUP_PARAMETERS_H_
6 #define PRINTING_NUP_PARAMETERS_H_
7
8 #include "base/component_export.h"
9
10 namespace printing {
11
12 class COMPONENT_EXPORT(PRINTING) NupParameters {
13  public:
14   // Callers should check `pages_per_sheet` values with IsSupported() first,
15   // and only pass in supported values.
16   NupParameters(int pages_per_sheet, bool is_source_landscape);
17
18   // Whether or not the input `pages_per_sheet` is a supported N-up value.
19   // Supported values are: 1 2 4 6 9 16
20   static bool IsSupported(int pages_per_sheet);
21
22   // Orientation of the to-be-generated N-up PDF document.
23   bool landscape() const { return landscape_; }
24   int num_pages_on_x_axis() const { return num_pages_on_x_axis_; }
25   int num_pages_on_y_axis() const { return num_pages_on_y_axis_; }
26
27  private:
28   // Calculates the `num_pages_on_x_axis_`, `num_pages_on_y_axis_` and
29   // `landscape_` based on the input.
30   void SetParameters(int pages_per_sheet, bool is_source_landscape);
31
32   int num_pages_on_x_axis_ = 1;
33   int num_pages_on_y_axis_ = 1;
34   bool landscape_ = false;
35 };
36
37 }  // namespace printing
38
39 #endif  // PRINTING_NUP_PARAMETERS_H_