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

Side by Side Diff: core/src/fxge/apple/fx_mac_imp.cpp

Issue 1062863006: Remove checks in fxge/{apple,win32,skia,dib} now that FX_NEW cant return 0 (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Fix missing |new| typo. Created 5 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 | « no previous file | core/src/fxge/apple/fx_quartz_device.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/fxge/fx_ge.h" 7 #include "../../../include/fxge/fx_ge.h"
8 #include "apple_int.h" 8 #include "apple_int.h"
9 #if _FX_OS_ == _FX_MACOSX_ 9 #if _FX_OS_ == _FX_MACOSX_
10 static const struct { 10 static const struct {
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 case FXFONT_CHINESEBIG5_CHARSET: 80 case FXFONT_CHINESEBIG5_CHARSET:
81 face = "LiSong Pro Light"; 81 face = "LiSong Pro Light";
82 } 82 }
83 if (m_FontList.Lookup(face, p)) { 83 if (m_FontList.Lookup(face, p)) {
84 return p; 84 return p;
85 } 85 }
86 return NULL; 86 return NULL;
87 } 87 }
88 IFX_SystemFontInfo* IFX_SystemFontInfo::CreateDefault() 88 IFX_SystemFontInfo* IFX_SystemFontInfo::CreateDefault()
89 { 89 {
90 CFX_MacFontInfo* pInfo = FX_NEW CFX_MacFontInfo; 90 CFX_MacFontInfo* pInfo = new CFX_MacFontInfo;
91 if (!pInfo) {
92 return NULL;
93 }
94 pInfo->AddPath("~/Library/Fonts"); 91 pInfo->AddPath("~/Library/Fonts");
95 pInfo->AddPath("/Library/Fonts"); 92 pInfo->AddPath("/Library/Fonts");
96 pInfo->AddPath("/System/Library/Fonts"); 93 pInfo->AddPath("/System/Library/Fonts");
97 return pInfo; 94 return pInfo;
98 } 95 }
99 void CFX_GEModule::InitPlatform() 96 void CFX_GEModule::InitPlatform()
100 { 97 {
101 m_pPlatformData = FX_NEW CApplePlatform; 98 m_pPlatformData = new CApplePlatform;
102 m_pFontMgr->SetSystemFontInfo(IFX_SystemFontInfo::CreateDefault()); 99 m_pFontMgr->SetSystemFontInfo(IFX_SystemFontInfo::CreateDefault());
103 } 100 }
104 void CFX_GEModule::DestroyPlatform() 101 void CFX_GEModule::DestroyPlatform()
105 { 102 {
106 if (m_pPlatformData) { 103 if (m_pPlatformData) {
107 delete (CApplePlatform *) m_pPlatformData; 104 delete (CApplePlatform *) m_pPlatformData;
108 } 105 }
109 m_pPlatformData = NULL; 106 m_pPlatformData = NULL;
110 } 107 }
111 #endif 108 #endif
OLDNEW
« no previous file with comments | « no previous file | core/src/fxge/apple/fx_quartz_device.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698