| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium 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 #include "content/common/font_list.h" | 5 #include "content/common/font_list.h" |
| 6 | 6 |
| 7 #include <windows.h> | 7 #include <windows.h> |
| 8 | 8 |
| 9 #include <set> | 9 #include <set> |
| 10 | 10 |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 | 38 |
| 39 HDC hdc = ::GetDC(NULL); | 39 HDC hdc = ::GetDC(NULL); |
| 40 ::EnumFontFamiliesExW(hdc, &logfont, (FONTENUMPROCW)&EnumFontFamExProc, | 40 ::EnumFontFamiliesExW(hdc, &logfont, (FONTENUMPROCW)&EnumFontFamExProc, |
| 41 (LPARAM)&font_names, 0); | 41 (LPARAM)&font_names, 0); |
| 42 ::ReleaseDC(NULL, hdc); | 42 ::ReleaseDC(NULL, hdc); |
| 43 | 43 |
| 44 ListValue* font_list = new ListValue; | 44 ListValue* font_list = new ListValue; |
| 45 std::set<string16>::iterator iter; | 45 std::set<string16>::iterator iter; |
| 46 for (iter = font_names.begin(); iter != font_names.end(); iter++) { | 46 for (iter = font_names.begin(); iter != font_names.end(); iter++) { |
| 47 ListValue* font_item = new ListValue(); | 47 ListValue* font_item = new ListValue(); |
| 48 font_item->Append(Value::CreateStringValue(*iter)); | 48 font_item->Append(base::StringValue::New(*iter)); |
| 49 font_item->Append(Value::CreateStringValue(*iter)); | 49 font_item->Append(base::StringValue::New(*iter)); |
| 50 font_list->Append(font_item); | 50 font_list->Append(font_item); |
| 51 } | 51 } |
| 52 return font_list; | 52 return font_list; |
| 53 } | 53 } |
| 54 | 54 |
| 55 } // namespace content | 55 } // namespace content |
| OLD | NEW |