• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2016 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 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 
7 #ifndef FXJS_XFA_CFXJSE_RUNTIMEDATA_H_
8 #define FXJS_XFA_CFXJSE_RUNTIMEDATA_H_
9 
10 #include <memory>
11 
12 #include "fxjs/cfxjs_engine.h"
13 #include "v8/include/v8.h"
14 
15 class CFXJSE_RuntimeData : public FXJS_PerIsolateData::ExtensionIface {
16  public:
17   ~CFXJSE_RuntimeData() override;
18 
19   static CFXJSE_RuntimeData* Get(v8::Isolate* pIsolate);
20 
21   v8::Global<v8::FunctionTemplate> m_hRootContextGlobalTemplate;
22   v8::Global<v8::Context> m_hRootContext;
23 
24  protected:
25   CFXJSE_RuntimeData();
26 
27   static std::unique_ptr<CFXJSE_RuntimeData> Create(v8::Isolate* pIsolate);
28 
29  private:
30   CFXJSE_RuntimeData(const CFXJSE_RuntimeData&) = delete;
31   CFXJSE_RuntimeData& operator=(const CFXJSE_RuntimeData&) = delete;
32 };
33 
34 #endif  // FXJS_XFA_CFXJSE_RUNTIMEDATA_H_
35