Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(346)

Side by Side Diff: fpdfsdk/src/javascript/JS_Object.h

Issue 1389163007: Pass IJS_Runtime, not IJS_Context, to native object constructors. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Merge changes into stub. Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « fpdfsdk/src/javascript/JS_EventHandler.cpp ('k') | fpdfsdk/src/javascript/JS_Runtime.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #ifndef FPDFSDK_SRC_JAVASCRIPT_JS_OBJECT_H_ 7 #ifndef FPDFSDK_SRC_JAVASCRIPT_JS_OBJECT_H_
8 #define FPDFSDK_SRC_JAVASCRIPT_JS_OBJECT_H_ 8 #define FPDFSDK_SRC_JAVASCRIPT_JS_OBJECT_H_
9 9
10 #include <map> 10 #include <map>
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 public: 42 public:
43 explicit CJS_Object(v8::Local<v8::Object> pObject); 43 explicit CJS_Object(v8::Local<v8::Object> pObject);
44 virtual ~CJS_Object(); 44 virtual ~CJS_Object();
45 45
46 void MakeWeak(); 46 void MakeWeak();
47 void Dispose(); 47 void Dispose();
48 48
49 virtual FX_BOOL IsType(const FX_CHAR* sClassName) { return TRUE; } 49 virtual FX_BOOL IsType(const FX_CHAR* sClassName) { return TRUE; }
50 virtual CFX_ByteString GetClassName() { return ""; } 50 virtual CFX_ByteString GetClassName() { return ""; }
51 51
52 virtual FX_BOOL InitInstance(IJS_Context* cc) { return TRUE; } 52 virtual void InitInstance(IJS_Runtime* pIRuntime) {}
53 virtual FX_BOOL ExitInstance() { return TRUE; } 53 virtual void ExitInstance() {}
54 54
55 v8::Local<v8::Object> ToV8Object() { return m_pV8Object.Get(m_pIsolate); } 55 v8::Local<v8::Object> ToV8Object() { return m_pV8Object.Get(m_pIsolate); }
56 56
57 // Takes ownership of |pObj|. 57 // Takes ownership of |pObj|.
58 void SetEmbedObject(CJS_EmbedObj* pObj) { m_pEmbedObj.reset(pObj); } 58 void SetEmbedObject(CJS_EmbedObj* pObj) { m_pEmbedObj.reset(pObj); }
59 CJS_EmbedObj* GetEmbedObject() const { return m_pEmbedObj.get(); } 59 CJS_EmbedObj* GetEmbedObject() const { return m_pEmbedObj.get(); }
60 60
61 static int MsgBox(CPDFDoc_Environment* pApp, 61 static int MsgBox(CPDFDoc_Environment* pApp,
62 const FX_WCHAR* swMsg, 62 const FX_WCHAR* swMsg,
63 const FX_WCHAR* swTitle, 63 const FX_WCHAR* swTitle,
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 107
108 // data 108 // data
109 const int m_nType; // 0:Interval; 1:TimeOut 109 const int m_nType; // 0:Interval; 1:TimeOut
110 const FX_DWORD m_dwTimeOut; 110 const FX_DWORD m_dwTimeOut;
111 const CFX_WideString m_swJScript; 111 const CFX_WideString m_swJScript;
112 CJS_Runtime* const m_pRuntime; 112 CJS_Runtime* const m_pRuntime;
113 CPDFDoc_Environment* const m_pApp; 113 CPDFDoc_Environment* const m_pApp;
114 }; 114 };
115 115
116 #endif // FPDFSDK_SRC_JAVASCRIPT_JS_OBJECT_H_ 116 #endif // FPDFSDK_SRC_JAVASCRIPT_JS_OBJECT_H_
OLDNEW
« no previous file with comments | « fpdfsdk/src/javascript/JS_EventHandler.cpp ('k') | fpdfsdk/src/javascript/JS_Runtime.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698