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

Side by Side Diff: content/common/font_list_win.cc

Issue 2664753002: Remove base::StringValue (Closed)
Patch Set: Rebase Created 3 years, 9 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 | « content/common/font_list_mac.mm ('k') | content/renderer/render_frame_impl.cc » ('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 (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 #include <string.h> 8 #include <string.h>
9 9
10 #include <set> 10 #include <set>
(...skipping 28 matching lines...) Expand all
39 39
40 HDC hdc = ::GetDC(NULL); 40 HDC hdc = ::GetDC(NULL);
41 ::EnumFontFamiliesExW(hdc, &logfont, (FONTENUMPROCW)&EnumFontFamExProc, 41 ::EnumFontFamiliesExW(hdc, &logfont, (FONTENUMPROCW)&EnumFontFamExProc,
42 (LPARAM)&font_names, 0); 42 (LPARAM)&font_names, 0);
43 ::ReleaseDC(NULL, hdc); 43 ::ReleaseDC(NULL, hdc);
44 44
45 std::unique_ptr<base::ListValue> font_list(new base::ListValue); 45 std::unique_ptr<base::ListValue> font_list(new base::ListValue);
46 std::set<base::string16>::iterator iter; 46 std::set<base::string16>::iterator iter;
47 for (iter = font_names.begin(); iter != font_names.end(); ++iter) { 47 for (iter = font_names.begin(); iter != font_names.end(); ++iter) {
48 base::ListValue* font_item = new base::ListValue(); 48 base::ListValue* font_item = new base::ListValue();
49 font_item->Append(new base::StringValue(*iter)); 49 font_item->Append(new base::Value(*iter));
50 font_item->Append(new base::StringValue(*iter)); 50 font_item->Append(new base::Value(*iter));
51 font_list->Append(font_item); 51 font_list->Append(font_item);
52 } 52 }
53 return font_list; 53 return font_list;
54 } 54 }
55 55
56 } // namespace content 56 } // namespace content
OLDNEW
« no previous file with comments | « content/common/font_list_mac.mm ('k') | content/renderer/render_frame_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698