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

Unified Diff: pdf/pdfium/pdfium_engine.h

Issue 2398763002: Add font substitution metric for Linux (Closed)
Patch Set: No ScopedSubstFont in PDFiumEngineExports Created 4 years, 2 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
« no previous file with comments | « pdf/pdf_engine.h ('k') | pdf/pdfium/pdfium_engine.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pdf/pdfium/pdfium_engine.h
diff --git a/pdf/pdfium/pdfium_engine.h b/pdf/pdfium/pdfium_engine.h
index 07c15b56e865c9dca7c344e278c244c3028adc45..7826a5dcb57d4cc845fefcd232b4c12930bd5ece 100644
--- a/pdf/pdfium/pdfium_engine.h
+++ b/pdf/pdfium/pdfium_engine.h
@@ -120,6 +120,7 @@ class PDFiumEngine : public PDFEngine,
void OnDocumentComplete() override;
void UnsupportedFeature(int type);
+ void FontSubstituted();
std::string current_find_text() const { return current_find_text_; }
@@ -742,6 +743,21 @@ class ScopedUnsupportedFeature {
private:
PDFiumEngine* const old_engine_;
+
+ DISALLOW_COPY_AND_ASSIGN(ScopedUnsupportedFeature);
+};
+
+// Create a local variable of this when calling PDFium functions which can call
+// our global callback when a substitute font is mapped.
+class ScopedSubstFont {
+ public:
+ explicit ScopedSubstFont(PDFiumEngine* engine);
+ ~ScopedSubstFont();
+
+ private:
+ PDFiumEngine* const old_engine_;
+
+ DISALLOW_COPY_AND_ASSIGN(ScopedSubstFont);
};
class PDFiumEngineExports : public PDFEngineExports {
« no previous file with comments | « pdf/pdf_engine.h ('k') | pdf/pdfium/pdfium_engine.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698