fixup! [M120 Migration][NaCl][PPFWK] Upgradable pepper plugin requirement
[platform/framework/web/chromium-efl.git] / pdf / v8_value_converter.h
1 // Copyright 2022 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 PDF_V8_VALUE_CONVERTER_H_
6 #define PDF_V8_VALUE_CONVERTER_H_
7
8 #include <memory>
9
10 #include "v8/include/v8-forward.h"
11
12 namespace base {
13 class Value;
14 }  // namespace base
15
16 namespace chrome_pdf {
17
18 // Abstraction layer for base::Value from/to V8::Value conversions.
19 // Necessary because //pdf should not directly depend on //content. If the V8
20 // V8 value conversion code ever moves into Blink, remove this and use the
21 // conversion code from Blink directly.
22
23 class V8ValueConverter {
24  public:
25   virtual std::unique_ptr<base::Value> FromV8Value(
26       v8::Local<v8::Value> value,
27       v8::Local<v8::Context> context) = 0;
28
29  protected:
30   ~V8ValueConverter() = default;
31 };
32
33 }  // namespace chrome_pdf
34
35 #endif  // PDF_V8_VALUE_CONVERTER_H_