summaryrefslogtreecommitdiff
path: root/chromium/printing/print_settings_conversion.h
blob: b619d3defd20a15f8f5d5af45599f6019393a0b6 (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
33
34
// Copyright 2014 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_PRINT_SETTINGS_CONVERSION_H_
#define PRINTING_PRINT_SETTINGS_CONVERSION_H_

#include "printing/page_range.h"
#include "printing/printing_export.h"

namespace base {
class DictionaryValue;
class Value;
}  // namespace base

namespace printing {

class PrintSettings;

PRINTING_EXPORT PageRanges
GetPageRangesFromJobSettings(const base::Value& job_settings);

PRINTING_EXPORT bool PrintSettingsFromJobSettings(
    const base::Value& job_settings,
    PrintSettings* print_settings);

// Use for debug only, because output is not completely consistent with format
// of |PrintSettingsFromJobSettings| input.
void PrintSettingsToJobSettingsDebug(const PrintSettings& settings,
                                     base::DictionaryValue* job_settings);

}  // namespace printing

#endif  // PRINTING_PRINT_SETTINGS_CONVERSION_H_