Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CONTENT_BROWSER_FONT_ACCESS_FONT_GETTER_H_ | |
| 6 #define CONTENT_BROWSER_FONT_ACCESS_FONT_GETTER_H_ | |
| 7 | |
| 8 #include <map> | |
| 9 #include <string> | |
| 10 | |
| 11 #include "base/macros.h" | |
| 12 #include "base/memory/scoped_ptr.h" | |
| 13 | |
| 14 namespace content { | |
| 15 | |
| 16 struct FontInformation { | |
| 17 FontInformation(std::string path, std::string fullName) | |
| 18 : path(path), fullName(fullName) {} | |
|
esprehn
2016/02/09 19:29:56
full_name ?
Daniel Nishi
2016/02/11 00:23:50
Done.
| |
| 19 | |
| 20 std::string path; | |
| 21 std::string fullName; | |
|
esprehn
2016/02/09 19:29:56
full_name ?
Daniel Nishi
2016/02/11 00:23:50
Done.
| |
| 22 }; | |
| 23 | |
| 24 typedef std::string FontFamily; | |
| 25 typedef std::string FontStyle; | |
| 26 typedef std::map<const FontStyle, const FontInformation> FontStyleMap; | |
| 27 typedef std::map<const FontFamily, FontStyleMap> FontCacheMap; | |
|
esprehn
2016/02/09 19:29:56
why not hash_map for both?
Daniel Nishi
2016/02/11 00:23:50
Given the lookup speed, hash_map does seem more ap
| |
| 28 | |
| 29 extern const char kFontAccessToken[]; | |
| 30 | |
| 31 scoped_ptr<FontCacheMap> GetFontCacheMap(); | |
| 32 | |
| 33 } // namespace content | |
| 34 | |
| 35 #endif // CONTENT_COMMON_FONT_LIST_H_ | |
| OLD | NEW |