summaryrefslogtreecommitdiff
path: root/fpdfsdk/include/javascript/JS_Runtime.h
diff options
context:
space:
mode:
authorNico Weber <thakis@chromium.org>2015-08-04 12:19:10 -0700
committerNico Weber <thakis@chromium.org>2015-08-04 12:19:10 -0700
commitb048f791a15f2da781a01eba5b09eb9d389f9c11 (patch)
tree6850a73c18bbc41eaf4b1fdc6b3c96646d45587b /fpdfsdk/include/javascript/JS_Runtime.h
parentc8eeed31f217d99a706b0cbf5e4ce0bcc12beb64 (diff)
downloadpdfium-b048f791a15f2da781a01eba5b09eb9d389f9c11.tar.xz
clang-format all pdfium code.
No behavior change. Generated by: find . -name '*.cpp' -o -name '*.h' | \ grep -E -v 'third_party|thirdparties|lpng_v163' | \ xargs ../../buildtools/mac/clang-format -i See thread "tabs vs spaces" on pdfium@googlegroups.com for discussion. BUG=none R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1265503005 .
Diffstat (limited to 'fpdfsdk/include/javascript/JS_Runtime.h')
-rw-r--r--fpdfsdk/include/javascript/JS_Runtime.h81
1 files changed, 41 insertions, 40 deletions
diff --git a/fpdfsdk/include/javascript/JS_Runtime.h b/fpdfsdk/include/javascript/JS_Runtime.h
index 8fdfa8b733..f4dabf017e 100644
--- a/fpdfsdk/include/javascript/JS_Runtime.h
+++ b/fpdfsdk/include/javascript/JS_Runtime.h
@@ -16,59 +16,60 @@
class CJS_Context;
class CJS_ArrayBufferAllocator : public v8::ArrayBuffer::Allocator {
- void* Allocate(size_t length) override;
- void* AllocateUninitialized(size_t length) override;
- void Free(void* data, size_t length) override;
+ void* Allocate(size_t length) override;
+ void* AllocateUninitialized(size_t length) override;
+ void Free(void* data, size_t length) override;
};
-class CJS_FieldEvent
-{
-public:
- CFX_WideString sTargetName;
- JS_EVENT_T eEventType;
- CJS_FieldEvent* pNext;
+class CJS_FieldEvent {
+ public:
+ CFX_WideString sTargetName;
+ JS_EVENT_T eEventType;
+ CJS_FieldEvent* pNext;
};
-class CJS_Runtime : public IFXJS_Runtime
-{
-public:
- CJS_Runtime(CPDFDoc_Environment * pApp);
- virtual ~CJS_Runtime();
+class CJS_Runtime : public IFXJS_Runtime {
+ public:
+ CJS_Runtime(CPDFDoc_Environment* pApp);
+ virtual ~CJS_Runtime();
- virtual IFXJS_Context * NewContext();
- virtual void ReleaseContext(IFXJS_Context * pContext);
- virtual IFXJS_Context* GetCurrentContext();
+ virtual IFXJS_Context* NewContext();
+ virtual void ReleaseContext(IFXJS_Context* pContext);
+ virtual IFXJS_Context* GetCurrentContext();
- virtual void SetReaderDocument(CPDFSDK_Document *pReaderDoc);
- virtual CPDFSDK_Document * GetReaderDocument(){return m_pDocument;}
+ virtual void SetReaderDocument(CPDFSDK_Document* pReaderDoc);
+ virtual CPDFSDK_Document* GetReaderDocument() { return m_pDocument; }
- CPDFDoc_Environment * GetReaderApp(){return m_pApp;}
+ CPDFDoc_Environment* GetReaderApp() { return m_pApp; }
- FX_BOOL InitJSObjects();
+ FX_BOOL InitJSObjects();
- FX_BOOL AddEventToLoop(const CFX_WideString& sTargetName, JS_EVENT_T eEventType);
- void RemoveEventInLoop(const CFX_WideString& sTargetName, JS_EVENT_T eEventType);
- void RemoveEventsInLoop(CJS_FieldEvent* pStart);
+ FX_BOOL AddEventToLoop(const CFX_WideString& sTargetName,
+ JS_EVENT_T eEventType);
+ void RemoveEventInLoop(const CFX_WideString& sTargetName,
+ JS_EVENT_T eEventType);
+ void RemoveEventsInLoop(CJS_FieldEvent* pStart);
- void BeginBlock(){m_bBlocking = TRUE;}
- void EndBlock(){m_bBlocking = FALSE;}
- FX_BOOL IsBlocking(){return m_bBlocking;}
+ void BeginBlock() { m_bBlocking = TRUE; }
+ void EndBlock() { m_bBlocking = FALSE; }
+ FX_BOOL IsBlocking() { return m_bBlocking; }
- operator IJS_Runtime*() {return (IJS_Runtime*)m_isolate;}
- v8::Isolate* GetIsolate(){return m_isolate;};
- void SetIsolate(v8::Isolate* isolate){m_isolate = isolate;}
+ operator IJS_Runtime*() { return (IJS_Runtime*)m_isolate; }
+ v8::Isolate* GetIsolate() { return m_isolate; };
+ void SetIsolate(v8::Isolate* isolate) { m_isolate = isolate; }
- v8::Local<v8::Context> NewJSContext();
-protected:
- CFX_ArrayTemplate<CJS_Context*> m_ContextArray;
- CPDFDoc_Environment* m_pApp;
- CPDFSDK_Document* m_pDocument;
- FX_BOOL m_bBlocking;
- CJS_FieldEvent* m_pFieldEventPath;
+ v8::Local<v8::Context> NewJSContext();
- v8::Isolate* m_isolate;
- nonstd::unique_ptr<CJS_ArrayBufferAllocator> m_pArrayBufferAllocator;
- v8::Global<v8::Context> m_context;
+ protected:
+ CFX_ArrayTemplate<CJS_Context*> m_ContextArray;
+ CPDFDoc_Environment* m_pApp;
+ CPDFSDK_Document* m_pDocument;
+ FX_BOOL m_bBlocking;
+ CJS_FieldEvent* m_pFieldEventPath;
+
+ v8::Isolate* m_isolate;
+ nonstd::unique_ptr<CJS_ArrayBufferAllocator> m_pArrayBufferAllocator;
+ v8::Global<v8::Context> m_context;
};
#endif // FPDFSDK_INCLUDE_JAVASCRIPT_JS_RUNTIME_H_