• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2019 PDFium Authors. All rights reserved.
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 TESTING_V8_INITIALIZER_H_
6 #define TESTING_V8_INITIALIZER_H_
7 
8 #include <memory>
9 #include <string>
10 
11 #ifndef PDF_ENABLE_V8
12 #error "V8 must be enabled"
13 #endif
14 
15 namespace v8 {
16 class Platform;
17 #ifdef V8_USE_EXTERNAL_STARTUP_DATA
18 class StartupData;
19 #endif
20 }  // namespace v8
21 
22 #ifdef V8_USE_EXTERNAL_STARTUP_DATA
23 // |snapshot_blob| is an optional out parameter.
24 std::unique_ptr<v8::Platform> InitializeV8ForPDFiumWithStartupData(
25     const std::string& exe_path,
26     const std::string& bin_dir,
27     v8::StartupData* snapshot_blob);
28 #else
29 std::unique_ptr<v8::Platform> InitializeV8ForPDFium(
30     const std::string& exe_path);
31 #endif
32 
33 #endif  // TESTING_V8_INITIALIZER_H_
34