Chromium Code Reviews| Index: content/browser/font_access/font_getter.h |
| diff --git a/content/browser/font_access/font_getter.h b/content/browser/font_access/font_getter.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..db76818ec5ee50915350ecf8719b3c8bca95aa9a |
| --- /dev/null |
| +++ b/content/browser/font_access/font_getter.h |
| @@ -0,0 +1,35 @@ |
| +// Copyright (c) 2016 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CONTENT_BROWSER_FONT_ACCESS_FONT_GETTER_H_ |
| +#define CONTENT_BROWSER_FONT_ACCESS_FONT_GETTER_H_ |
| + |
| +#include <map> |
| +#include <string> |
| + |
| +#include "base/macros.h" |
| +#include "base/memory/scoped_ptr.h" |
| + |
| +namespace content { |
| + |
| +struct FontInformation { |
| + FontInformation(std::string path, std::string fullName) |
| + : path(path), fullName(fullName) {} |
|
esprehn
2016/02/09 19:29:56
full_name ?
Daniel Nishi
2016/02/11 00:23:50
Done.
|
| + |
| + std::string path; |
| + std::string fullName; |
|
esprehn
2016/02/09 19:29:56
full_name ?
Daniel Nishi
2016/02/11 00:23:50
Done.
|
| +}; |
| + |
| +typedef std::string FontFamily; |
| +typedef std::string FontStyle; |
| +typedef std::map<const FontStyle, const FontInformation> FontStyleMap; |
| +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
|
| + |
| +extern const char kFontAccessToken[]; |
| + |
| +scoped_ptr<FontCacheMap> GetFontCacheMap(); |
| + |
| +} // namespace content |
| + |
| +#endif // CONTENT_COMMON_FONT_LIST_H_ |