forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathparsed_params.h
44 lines (31 loc) · 1.1 KB
/
parsed_params.h
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
35
36
37
38
39
40
41
42
43
44
// Copyright 2021 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 PDF_PARSED_PARAMS_H_
#define PDF_PARSED_PARAMS_H_
#include <string>
#include "third_party/abseil-cpp/absl/types/optional.h"
#include "third_party/skia/include/core/SkColor.h"
namespace blink {
struct WebPluginParams;
}
namespace chrome_pdf {
struct ParsedParams {
ParsedParams();
ParsedParams(const ParsedParams& other);
~ParsedParams();
// Document URL. Must not be empty.
std::string original_url;
// Document stream URL. Must not be empty.
std::string stream_url;
// The background color for the PDF viewer.
absl::optional<SkColor> background_color;
// Whether the plugin should occupy the entire frame.
bool full_frame = false;
};
// Creates an `ParsedParams` by parsing a `blink::WebPluginParams`. If
// `blink::WebPluginParams` is invalid, returns absl::nullopt.
absl::optional<ParsedParams> ParseWebPluginParams(
const blink::WebPluginParams& params);
} // namespace chrome_pdf
#endif // PDF_PARSED_PARAMS_H_