• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2017 The PDFium 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 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 
7 #ifndef FXJS_CJS_EVENT_CONTEXT_STUB_H_
8 #define FXJS_CJS_EVENT_CONTEXT_STUB_H_
9 
10 #include "fxjs/ijs_event_context.h"
11 
12 class CJS_EventContextStub final : public IJS_EventContext {
13  public:
14   CJS_EventContextStub();
15   ~CJS_EventContextStub() override;
16 
17   // IJS_EventContext:
18   absl::optional<IJS_Runtime::JS_Error> RunScript(
19       const WideString& script) override;
20 
OnDoc_Open(const WideString & strTargetName)21   void OnDoc_Open(const WideString& strTargetName) override {}
OnDoc_WillPrint()22   void OnDoc_WillPrint() override {}
OnDoc_DidPrint()23   void OnDoc_DidPrint() override {}
OnDoc_WillSave()24   void OnDoc_WillSave() override {}
OnDoc_DidSave()25   void OnDoc_DidSave() override {}
OnDoc_WillClose()26   void OnDoc_WillClose() override {}
OnPage_Open()27   void OnPage_Open() override {}
OnPage_Close()28   void OnPage_Close() override {}
OnPage_InView()29   void OnPage_InView() override {}
OnPage_OutView()30   void OnPage_OutView() override {}
OnField_MouseDown(bool bModifier,bool bShift,CPDF_FormField * pTarget)31   void OnField_MouseDown(bool bModifier,
32                          bool bShift,
33                          CPDF_FormField* pTarget) override {}
OnField_MouseEnter(bool bModifier,bool bShift,CPDF_FormField * pTarget)34   void OnField_MouseEnter(bool bModifier,
35                           bool bShift,
36                           CPDF_FormField* pTarget) override {}
OnField_MouseExit(bool bModifier,bool bShift,CPDF_FormField * pTarget)37   void OnField_MouseExit(bool bModifier,
38                          bool bShift,
39                          CPDF_FormField* pTarget) override {}
OnField_MouseUp(bool bModifier,bool bShift,CPDF_FormField * pTarget)40   void OnField_MouseUp(bool bModifier,
41                        bool bShift,
42                        CPDF_FormField* pTarget) override {}
OnField_Focus(bool bModifier,bool bShift,CPDF_FormField * pTarget,WideString * Value)43   void OnField_Focus(bool bModifier,
44                      bool bShift,
45                      CPDF_FormField* pTarget,
46                      WideString* Value) override {}
OnField_Blur(bool bModifier,bool bShift,CPDF_FormField * pTarget,WideString * Value)47   void OnField_Blur(bool bModifier,
48                     bool bShift,
49                     CPDF_FormField* pTarget,
50                     WideString* Value) override {}
OnField_Calculate(CPDF_FormField * pSource,CPDF_FormField * pTarget,WideString * pValue,bool * pRc)51   void OnField_Calculate(CPDF_FormField* pSource,
52                          CPDF_FormField* pTarget,
53                          WideString* pValue,
54                          bool* pRc) override {}
OnField_Format(CPDF_FormField * pTarget,WideString * Value)55   void OnField_Format(CPDF_FormField* pTarget, WideString* Value) override {}
OnField_Keystroke(WideString * strChange,const WideString & strChangeEx,bool KeyDown,bool bModifier,int * nSelEnd,int * nSelStart,bool bShift,CPDF_FormField * pTarget,WideString * Value,bool bWillCommit,bool bFieldFull,bool * bRc)56   void OnField_Keystroke(WideString* strChange,
57                          const WideString& strChangeEx,
58                          bool KeyDown,
59                          bool bModifier,
60                          int* nSelEnd,
61                          int* nSelStart,
62                          bool bShift,
63                          CPDF_FormField* pTarget,
64                          WideString* Value,
65                          bool bWillCommit,
66                          bool bFieldFull,
67                          bool* bRc) override {}
OnField_Validate(WideString * strChange,const WideString & strChangeEx,bool bKeyDown,bool bModifier,bool bShift,CPDF_FormField * pTarget,WideString * Value,bool * bRc)68   void OnField_Validate(WideString* strChange,
69                         const WideString& strChangeEx,
70                         bool bKeyDown,
71                         bool bModifier,
72                         bool bShift,
73                         CPDF_FormField* pTarget,
74                         WideString* Value,
75                         bool* bRc) override {}
OnExternal_Exec()76   void OnExternal_Exec() override {}
77 };
78 
79 #endif  // FXJS_CJS_EVENT_CONTEXT_STUB_H_
80