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

Side by Side Diff: fpdfsdk/src/javascript/JS_Runtime.cpp

Issue 726143002: Remove FX_LPCWSTR cast to wchar_t* literals (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 6 years, 1 month 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/src/javascript/JS_EventHandler.cpp ('k') | fpdfsdk/src/javascript/PublicMethods.cpp » ('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 "../../include/javascript/JavaScript.h" 7 #include "../../include/javascript/JavaScript.h"
8 #include "../../include/javascript/IJavaScript.h" 8 #include "../../include/javascript/IJavaScript.h"
9 #include "../../include/javascript/JS_EventHandler.h" 9 #include "../../include/javascript/JS_EventHandler.h"
10 #include "../../include/javascript/JS_Runtime.h" 10 #include "../../include/javascript/JS_Runtime.h"
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 } 323 }
324 324
325 v8::Handle<v8::Context> CJS_Runtime::NewJSContext() 325 v8::Handle<v8::Context> CJS_Runtime::NewJSContext()
326 { 326 {
327 return v8::Local<v8::Context>::New(m_isolate, m_context); 327 return v8::Local<v8::Context>::New(m_isolate, m_context);
328 } 328 }
329 329
330 CFX_WideString ChangeObjName(const CFX_WideString& str) 330 CFX_WideString ChangeObjName(const CFX_WideString& str)
331 { 331 {
332 CFX_WideString sRet = str; 332 CFX_WideString sRet = str;
333 » sRet.Replace((FX_LPCWSTR)L"_", (FX_LPCWSTR)L"."); 333 » sRet.Replace(L"_", L".");
334 return sRet; 334 return sRet;
335 } 335 }
336 336
337 void CJS_Runtime::GetObjectNames(CFX_WideStringArray& array) 337 void CJS_Runtime::GetObjectNames(CFX_WideStringArray& array)
338 { 338 {
339 array.RemoveAll(); 339 array.RemoveAll();
340 340
341 array.Add(CJS_Border::m_pClassName); 341 array.Add(CJS_Border::m_pClassName);
342 array.Add(CJS_Display::m_pClassName); 342 array.Add(CJS_Display::m_pClassName);
343 array.Add(CJS_Font::m_pClassName); 343 array.Add(CJS_Font::m_pClassName);
344 array.Add(CJS_Highlight::m_pClassName); 344 array.Add(CJS_Highlight::m_pClassName);
345 array.Add(CJS_Position::m_pClassName); 345 array.Add(CJS_Position::m_pClassName);
346 array.Add(CJS_ScaleHow::m_pClassName); 346 array.Add(CJS_ScaleHow::m_pClassName);
347 array.Add(CJS_ScaleWhen::m_pClassName); 347 array.Add(CJS_ScaleWhen::m_pClassName);
348 array.Add(CJS_Style::m_pClassName); 348 array.Add(CJS_Style::m_pClassName);
349 array.Add(CJS_Zoomtype::m_pClassName); 349 array.Add(CJS_Zoomtype::m_pClassName);
350 350
351 array.Add(CJS_App::m_pClassName); 351 array.Add(CJS_App::m_pClassName);
352 » array.Add((FX_LPCWSTR)"this"); 352 » array.Add(L"this");
353 array.Add(CJS_Event::m_pClassName); 353 array.Add(CJS_Event::m_pClassName);
354 354
355 array.Add(CJS_Global::m_pClassName); 355 array.Add(CJS_Global::m_pClassName);
356 array.Add(CJS_Util::m_pClassName); 356 array.Add(CJS_Util::m_pClassName);
357 } 357 }
358 358
359 void CJS_Runtime::GetObjectConsts(const CFX_WideString& sObjName, CFX_WideString Array& array) 359 void CJS_Runtime::GetObjectConsts(const CFX_WideString& sObjName, CFX_WideString Array& array)
360 { 360 {
361 JSConstSpec* pConsts = NULL; 361 JSConstSpec* pConsts = NULL;
362 int nSize = 0; 362 int nSize = 0;
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
469 return v8::Isolate::GetCurrent() == m_isolate; 469 return v8::Isolate::GetCurrent() == m_isolate;
470 } 470 }
471 void CJS_Runtime::Exit() 471 void CJS_Runtime::Exit()
472 { 472 {
473 if(m_isolate) m_isolate->Exit(); 473 if(m_isolate) m_isolate->Exit();
474 } 474 }
475 void CJS_Runtime::Enter() 475 void CJS_Runtime::Enter()
476 { 476 {
477 if(m_isolate) m_isolate->Enter(); 477 if(m_isolate) m_isolate->Enter();
478 } 478 }
OLDNEW
« no previous file with comments | « fpdfsdk/src/javascript/JS_EventHandler.cpp ('k') | fpdfsdk/src/javascript/PublicMethods.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698