diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2017-10-30 20:20:42 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-10-30 20:20:42 +0000 |
commit | e0345a4aecfd16264d393234cf8fe22250d771fe (patch) | |
tree | 046f8e6c074b8525d6cf71daf4f2039582fb572a /fpdfsdk/javascript/JS_KeyValue.cpp | |
parent | 341ec6256457c53d50f2d0a0667e61041d4d89be (diff) | |
download | pdfium-e0345a4aecfd16264d393234cf8fe22250d771fe.tar.xz |
Move fpdfsdk/javascript to fxjs/
This CL moves all of the CJS files into fxjs. The :javascript build rule
is removed and :fxjs is used instead.
Change-Id: I1701b308f51317d0346c7401b43812c3f43a27bf
Reviewed-on: https://pdfium-review.googlesource.com/17047
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'fpdfsdk/javascript/JS_KeyValue.cpp')
-rw-r--r-- | fpdfsdk/javascript/JS_KeyValue.cpp | 70 |
1 files changed, 0 insertions, 70 deletions
diff --git a/fpdfsdk/javascript/JS_KeyValue.cpp b/fpdfsdk/javascript/JS_KeyValue.cpp deleted file mode 100644 index 7d1e575377..0000000000 --- a/fpdfsdk/javascript/JS_KeyValue.cpp +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright 2016 PDFium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com - -#include "fpdfsdk/javascript/JS_KeyValue.h" - -CJS_GlobalVariableArray::CJS_GlobalVariableArray() {} - -CJS_GlobalVariableArray::~CJS_GlobalVariableArray() {} - -void CJS_GlobalVariableArray::Copy(const CJS_GlobalVariableArray& array) { - m_Array.clear(); - for (int i = 0, sz = array.Count(); i < sz; i++) { - CJS_KeyValue* pOldObjData = array.GetAt(i); - switch (pOldObjData->nType) { - case JS_GlobalDataType::NUMBER: { - CJS_KeyValue* pNewObjData = new CJS_KeyValue; - pNewObjData->sKey = pOldObjData->sKey; - pNewObjData->nType = pOldObjData->nType; - pNewObjData->dData = pOldObjData->dData; - Add(pNewObjData); - } break; - case JS_GlobalDataType::BOOLEAN: { - CJS_KeyValue* pNewObjData = new CJS_KeyValue; - pNewObjData->sKey = pOldObjData->sKey; - pNewObjData->nType = pOldObjData->nType; - pNewObjData->bData = pOldObjData->bData; - Add(pNewObjData); - } break; - case JS_GlobalDataType::STRING: { - CJS_KeyValue* pNewObjData = new CJS_KeyValue; - pNewObjData->sKey = pOldObjData->sKey; - pNewObjData->nType = pOldObjData->nType; - pNewObjData->sData = pOldObjData->sData; - Add(pNewObjData); - } break; - case JS_GlobalDataType::OBJECT: { - CJS_KeyValue* pNewObjData = new CJS_KeyValue; - pNewObjData->sKey = pOldObjData->sKey; - pNewObjData->nType = pOldObjData->nType; - pNewObjData->objData.Copy(pOldObjData->objData); - Add(pNewObjData); - } break; - case JS_GlobalDataType::NULLOBJ: { - CJS_KeyValue* pNewObjData = new CJS_KeyValue; - pNewObjData->sKey = pOldObjData->sKey; - pNewObjData->nType = pOldObjData->nType; - Add(pNewObjData); - } break; - } - } -} - -void CJS_GlobalVariableArray::Add(CJS_KeyValue* p) { - m_Array.push_back(std::unique_ptr<CJS_KeyValue>(p)); -} - -int CJS_GlobalVariableArray::Count() const { - return m_Array.size(); -} - -CJS_KeyValue* CJS_GlobalVariableArray::GetAt(int index) const { - return m_Array.at(index).get(); -} - -CJS_KeyValue::CJS_KeyValue() {} - -CJS_KeyValue::~CJS_KeyValue() {} |