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

Side by Side Diff: fpdfsdk/include/javascript/Document.h

Issue 1332973002: Remove some abstractions in fxjs_v8.h. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Remove implicit cast operator from CJS_Runtime. Created 5 years, 3 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/include/javascript/Consts.h ('k') | fpdfsdk/include/javascript/Field.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_INCLUDE_JAVASCRIPT_DOCUMENT_H_ 7 #ifndef FPDFSDK_INCLUDE_JAVASCRIPT_DOCUMENT_H_
8 #define FPDFSDK_INCLUDE_JAVASCRIPT_DOCUMENT_H_ 8 #define FPDFSDK_INCLUDE_JAVASCRIPT_DOCUMENT_H_
9 9
10 #include "JS_Define.h" 10 #include "JS_Define.h"
11 11
12 class PrintParamsObj : public CJS_EmbedObj { 12 class PrintParamsObj : public CJS_EmbedObj {
13 public: 13 public:
14 PrintParamsObj(CJS_Object* pJSObject); 14 PrintParamsObj(CJS_Object* pJSObject);
15 ~PrintParamsObj() override {} 15 ~PrintParamsObj() override {}
16 16
17 public: 17 public:
18 FX_BOOL bUI; 18 FX_BOOL bUI;
19 int nStart; 19 int nStart;
20 int nEnd; 20 int nEnd;
21 FX_BOOL bSilent; 21 FX_BOOL bSilent;
22 FX_BOOL bShrinkToFit; 22 FX_BOOL bShrinkToFit;
23 FX_BOOL bPrintAsImage; 23 FX_BOOL bPrintAsImage;
24 FX_BOOL bReverse; 24 FX_BOOL bReverse;
25 FX_BOOL bAnnotations; 25 FX_BOOL bAnnotations;
26 }; 26 };
27 27
28 class CJS_PrintParamsObj : public CJS_Object { 28 class CJS_PrintParamsObj : public CJS_Object {
29 public: 29 public:
30 CJS_PrintParamsObj(JSFXObject pObject) : CJS_Object(pObject) {} 30 CJS_PrintParamsObj(v8::Local<v8::Object> pObject) : CJS_Object(pObject) {}
31 ~CJS_PrintParamsObj() override {} 31 ~CJS_PrintParamsObj() override {}
32 32
33 DECLARE_JS_CLASS(CJS_PrintParamsObj); 33 DECLARE_JS_CLASS(CJS_PrintParamsObj);
34 }; 34 };
35 35
36 class Icon; 36 class Icon;
37 class Field; 37 class Field;
38 38
39 struct IconElement { 39 struct IconElement {
40 IconElement() : IconName(L""), NextIcon(NULL), IconStream(NULL) {} 40 IconElement() : IconName(L""), NextIcon(NULL), IconStream(NULL) {}
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 void DoAnnotDelay(); 302 void DoAnnotDelay();
303 void SetIsolate(v8::Isolate* isolate) { m_isolate = isolate; } 303 void SetIsolate(v8::Isolate* isolate) { m_isolate = isolate; }
304 CJS_Document* GetCJSDoc() const; 304 CJS_Document* GetCJSDoc() const;
305 305
306 private: 306 private:
307 CFX_WideString ReversalStr(CFX_WideString cbFrom); 307 CFX_WideString ReversalStr(CFX_WideString cbFrom);
308 CFX_WideString CutString(CFX_WideString cbFrom); 308 CFX_WideString CutString(CFX_WideString cbFrom);
309 bool IsEnclosedInRect(CFX_FloatRect rect, CFX_FloatRect LinkRect); 309 bool IsEnclosedInRect(CFX_FloatRect rect, CFX_FloatRect LinkRect);
310 int CountWords(CPDF_TextObject* pTextObj); 310 int CountWords(CPDF_TextObject* pTextObj);
311 CFX_WideString GetObjWordStr(CPDF_TextObject* pTextObj, int nWordIndex); 311 CFX_WideString GetObjWordStr(CPDF_TextObject* pTextObj, int nWordIndex);
312 FX_BOOL ParserParams(JSObject* pObj, CJS_AnnotObj& annotobj);
313 312
314 v8::Isolate* m_isolate; 313 v8::Isolate* m_isolate;
315 IconTree* m_pIconTree; 314 IconTree* m_pIconTree;
316 CPDFSDK_Document* m_pDocument; 315 CPDFSDK_Document* m_pDocument;
317 CFX_WideString m_cwBaseURL; 316 CFX_WideString m_cwBaseURL;
318 bool m_bDelay; 317 bool m_bDelay;
319 CFX_ArrayTemplate<CJS_DelayData*> m_DelayData; 318 CFX_ArrayTemplate<CJS_DelayData*> m_DelayData;
320 CFX_ArrayTemplate<CJS_AnnotObj*> m_DelayAnnotData; 319 CFX_ArrayTemplate<CJS_AnnotObj*> m_DelayAnnotData;
321 }; 320 };
322 321
323 class CJS_Document : public CJS_Object { 322 class CJS_Document : public CJS_Object {
324 public: 323 public:
325 explicit CJS_Document(JSFXObject pObject) : CJS_Object(pObject) {} 324 explicit CJS_Document(v8::Local<v8::Object> pObject) : CJS_Object(pObject) {}
326 ~CJS_Document() override {} 325 ~CJS_Document() override {}
327 326
328 // CJS_Object 327 // CJS_Object
329 FX_BOOL InitInstance(IFXJS_Context* cc) override; 328 FX_BOOL InitInstance(IFXJS_Context* cc) override;
330 329
331 DECLARE_JS_CLASS(CJS_Document); 330 DECLARE_JS_CLASS(CJS_Document);
332 331
333 JS_STATIC_PROP(ADBE, Document); 332 JS_STATIC_PROP(ADBE, Document);
334 JS_STATIC_PROP(author, Document); 333 JS_STATIC_PROP(author, Document);
335 JS_STATIC_PROP(baseURL, Document); 334 JS_STATIC_PROP(baseURL, Document);
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
398 JS_STATIC_METHOD(removeField, Document); 397 JS_STATIC_METHOD(removeField, Document);
399 JS_STATIC_METHOD(replacePages, Document); 398 JS_STATIC_METHOD(replacePages, Document);
400 JS_STATIC_METHOD(removeIcon, Document); 399 JS_STATIC_METHOD(removeIcon, Document);
401 JS_STATIC_METHOD(resetForm, Document); 400 JS_STATIC_METHOD(resetForm, Document);
402 JS_STATIC_METHOD(saveAs, Document); 401 JS_STATIC_METHOD(saveAs, Document);
403 JS_STATIC_METHOD(submitForm, Document); 402 JS_STATIC_METHOD(submitForm, Document);
404 JS_STATIC_METHOD(mailDoc, Document); 403 JS_STATIC_METHOD(mailDoc, Document);
405 }; 404 };
406 405
407 #endif // FPDFSDK_INCLUDE_JAVASCRIPT_DOCUMENT_H_ 406 #endif // FPDFSDK_INCLUDE_JAVASCRIPT_DOCUMENT_H_
OLDNEW
« no previous file with comments | « fpdfsdk/include/javascript/Consts.h ('k') | fpdfsdk/include/javascript/Field.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698