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

Side by Side Diff: fpdfsdk/javascript/global.cpp

Issue 1847583004: Move the fpdfsdk/include/javascript folder (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 8 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/javascript/event.cpp ('k') | fpdfsdk/javascript/ijs_context.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 #include "fpdfsdk/javascript/global.h" 7 #include "fpdfsdk/javascript/global.h"
8 8
9 #include <vector> 9 #include <vector>
10 10
11 #include "core/fxcrt/include/fx_ext.h" 11 #include "core/fxcrt/include/fx_ext.h"
12 #include "fpdfsdk/include/javascript/IJavaScript.h"
13 #include "fpdfsdk/javascript/JS_Context.h"
14 #include "fpdfsdk/javascript/JS_Define.h" 12 #include "fpdfsdk/javascript/JS_Define.h"
15 #include "fpdfsdk/javascript/JS_EventHandler.h" 13 #include "fpdfsdk/javascript/JS_EventHandler.h"
16 #include "fpdfsdk/javascript/JS_GlobalData.h" 14 #include "fpdfsdk/javascript/JS_GlobalData.h"
17 #include "fpdfsdk/javascript/JS_Object.h" 15 #include "fpdfsdk/javascript/JS_Object.h"
18 #include "fpdfsdk/javascript/JS_Value.h" 16 #include "fpdfsdk/javascript/JS_Value.h"
17 #include "fpdfsdk/javascript/cjs_context.h"
19 #include "fpdfsdk/javascript/resource.h" 18 #include "fpdfsdk/javascript/resource.h"
20 19
21 /* ---------------------------- global ---------------------------- */
22
23 // Helper class for compile-time calculation of hash values in order to 20 // Helper class for compile-time calculation of hash values in order to
24 // avoid having global object initializers. 21 // avoid having global object initializers.
25 template <unsigned ACC, wchar_t... Ns> 22 template <unsigned ACC, wchar_t... Ns>
26 struct CHash; 23 struct CHash;
27 24
28 // Only needed to hash single-character strings. 25 // Only needed to hash single-character strings.
29 template <wchar_t N> 26 template <wchar_t N>
30 struct CHash<N> { 27 struct CHash<N> {
31 static const unsigned value = N; 28 static const unsigned value = N;
32 }; 29 };
(...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after
507 return CJS_Value::VT_boolean; 504 return CJS_Value::VT_boolean;
508 if (nHash == JSCONST_nDateHash) 505 if (nHash == JSCONST_nDateHash)
509 return CJS_Value::VT_date; 506 return CJS_Value::VT_date;
510 if (nHash == JSCONST_nObjectHash) 507 if (nHash == JSCONST_nObjectHash)
511 return CJS_Value::VT_object; 508 return CJS_Value::VT_object;
512 if (nHash == JSCONST_nFXobjHash) 509 if (nHash == JSCONST_nFXobjHash)
513 return CJS_Value::VT_fxobject; 510 return CJS_Value::VT_fxobject;
514 511
515 return CJS_Value::VT_unknown; 512 return CJS_Value::VT_unknown;
516 } 513 }
OLDNEW
« no previous file with comments | « fpdfsdk/javascript/event.cpp ('k') | fpdfsdk/javascript/ijs_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698