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

Side by Side Diff: fpdfsdk/javascript/color.h

Issue 2217253002: Remove backpointer to runtime from CJS_Array. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 4 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
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_JAVASCRIPT_COLOR_H_ 7 #ifndef FPDFSDK_JAVASCRIPT_COLOR_H_
8 #define FPDFSDK_JAVASCRIPT_COLOR_H_ 8 #define FPDFSDK_JAVASCRIPT_COLOR_H_
9 9
10 #include <vector> 10 #include <vector>
(...skipping 24 matching lines...) Expand all
35 FX_BOOL convert(IJS_Context* cc, 35 FX_BOOL convert(IJS_Context* cc,
36 const std::vector<CJS_Value>& params, 36 const std::vector<CJS_Value>& params,
37 CJS_Value& vRet, 37 CJS_Value& vRet,
38 CFX_WideString& sError); 38 CFX_WideString& sError);
39 FX_BOOL equal(IJS_Context* cc, 39 FX_BOOL equal(IJS_Context* cc,
40 const std::vector<CJS_Value>& params, 40 const std::vector<CJS_Value>& params,
41 CJS_Value& vRet, 41 CJS_Value& vRet,
42 CFX_WideString& sError); 42 CFX_WideString& sError);
43 43
44 public: 44 public:
45 static void ConvertPWLColorToArray(const CPWL_Color& color, CJS_Array& array); 45 static void ConvertPWLColorToArray(CJS_Runtime* pRuntime,
46 static void ConvertArrayToPWLColor(CJS_Array& array, CPWL_Color& color); 46 const CPWL_Color& color,
47 CJS_Array& array);
Lei Zhang 2016/08/05 17:41:58 Change to a pointer?
Tom Sepez 2016/08/08 16:25:50 Yeah, both of these would benefit. Done. Also rem
48 static void ConvertArrayToPWLColor(CJS_Runtime* pRuntime,
49 CJS_Array& array,
50 CPWL_Color& color);
47 51
48 private: 52 private:
49 CPWL_Color m_crTransparent; 53 CPWL_Color m_crTransparent;
50 CPWL_Color m_crBlack; 54 CPWL_Color m_crBlack;
51 CPWL_Color m_crWhite; 55 CPWL_Color m_crWhite;
52 CPWL_Color m_crRed; 56 CPWL_Color m_crRed;
53 CPWL_Color m_crGreen; 57 CPWL_Color m_crGreen;
54 CPWL_Color m_crBlue; 58 CPWL_Color m_crBlue;
55 CPWL_Color m_crCyan; 59 CPWL_Color m_crCyan;
56 CPWL_Color m_crMagenta; 60 CPWL_Color m_crMagenta;
(...skipping 21 matching lines...) Expand all
78 JS_STATIC_PROP(red, color); 82 JS_STATIC_PROP(red, color);
79 JS_STATIC_PROP(transparent, color); 83 JS_STATIC_PROP(transparent, color);
80 JS_STATIC_PROP(white, color); 84 JS_STATIC_PROP(white, color);
81 JS_STATIC_PROP(yellow, color); 85 JS_STATIC_PROP(yellow, color);
82 86
83 JS_STATIC_METHOD(convert, color); 87 JS_STATIC_METHOD(convert, color);
84 JS_STATIC_METHOD(equal, color); 88 JS_STATIC_METHOD(equal, color);
85 }; 89 };
86 90
87 #endif // FPDFSDK_JAVASCRIPT_COLOR_H_ 91 #endif // FPDFSDK_JAVASCRIPT_COLOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698