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

Unified Diff: content/test/dwrite_font_fake_sender_win.h

Issue 2153343002: Implement support for loading font files from outside system directory (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Test patchset to run try job Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: content/test/dwrite_font_fake_sender_win.h
diff --git a/content/test/dwrite_font_fake_sender_win.h b/content/test/dwrite_font_fake_sender_win.h
index 84363cb1ca863f59ba6083d0c1eeff0c4eb0196f..cdc22460c13f89e56d041785728c7d9a6074bd9f 100644
--- a/content/test/dwrite_font_fake_sender_win.h
+++ b/content/test/dwrite_font_fake_sender_win.h
@@ -44,6 +44,11 @@ class FakeFont {
return *this;
}
+ FakeFont& AddFileHandle(uint32_t handle) {
+ file_handles_.push_back(handle);
+ return *this;
+ }
+
FakeFont& AddFamilyName(const base::string16& locale,
const base::string16& family_name) {
family_names_.emplace_back(locale, family_name);
@@ -56,6 +61,7 @@ class FakeFont {
friend FakeFontCollection;
base::string16 font_name_;
std::vector<base::string16> file_paths_;
+ std::vector<uint32_t> file_handles_;
std::vector<std::pair<base::string16, base::string16>> family_names_;
DISALLOW_ASSIGN(FakeFont);
@@ -117,7 +123,8 @@ class FakeFontCollection : public base::RefCounted<FakeFontCollection> {
uint32_t family_index,
std::vector<std::pair<base::string16, base::string16>>* family_names);
void OnGetFontFiles(uint32_t family_index,
- std::vector<base::string16>* file_paths_);
+ std::vector<base::string16>* file_paths,
+ std::vector<uint32_t>* file_handles);
void OnMapCharacters(const base::string16& text,
const DWriteFontStyle& font_style,
@@ -158,7 +165,8 @@ class FakeFontCollection : public base::RefCounted<FakeFontCollection> {
std::vector<std::pair<base::string16, base::string16>>* family_names);
void OnGetFontFiles(uint32_t family_index,
- std::vector<base::string16>* file_paths);
+ std::vector<base::string16>* file_paths,
+ std::vector<uint32_t>* file_handles);
void OnMapCharacters(const base::string16& text,
const DWriteFontStyle& font_style,

Powered by Google App Engine
This is Rietveld 408576698