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

Unified Diff: webkit/glue/webpreferences.h

Issue 7606028: Pass per-script fonts to WebKit settings. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 4 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: webkit/glue/webpreferences.h
diff --git a/webkit/glue/webpreferences.h b/webkit/glue/webpreferences.h
index 985f7ece8cd0f19c9a58b9752bffb2c923d72619..689ba14d6b252af466bd5c33d7900db174af397d 100644
--- a/webkit/glue/webpreferences.h
+++ b/webkit/glue/webpreferences.h
@@ -16,6 +16,7 @@
#include "base/string16.h"
#include "googleurl/src/gurl.h"
+#include "third_party/WebKit/Source/WebKit/chromium/public/WebSettings.h"
namespace WebKit {
class WebView;
@@ -28,6 +29,13 @@ struct WebPreferences {
string16 sans_serif_font_family;
string16 cursive_font_family;
string16 fantasy_font_family;
+ typedef std::vector<std::pair<std::string, string16> > ScriptFontFamilyMap;
Mattias Nissler (ping if slow) 2011/08/12 09:24:13 style guide says type declarations should go first
+ ScriptFontFamilyMap standard_font_family_map;
+ ScriptFontFamilyMap fixed_font_family_map;
+ ScriptFontFamilyMap serif_font_family_map;
+ ScriptFontFamilyMap sans_serif_font_family_map;
+ ScriptFontFamilyMap cursive_font_family_map;
+ ScriptFontFamilyMap fantasy_font_family_map;
int default_font_size;
int default_fixed_font_size;
int minimum_font_size;
@@ -101,6 +109,11 @@ struct WebPreferences {
~WebPreferences();
void Apply(WebKit::WebView* web_view) const;
+ typedef void (*SetFontFamilyWrapper)(
Mattias Nissler (ping if slow) 2011/08/12 09:24:13 same here
+ WebKit::WebSettings*, const string16&, UScriptCode);
+ void ApplyFontsFromMap(const ScriptFontFamilyMap& map,
+ SetFontFamilyWrapper setter,
+ WebKit::WebSettings* settings) const;
};
#endif // WEBKIT_GLUE_WEBPREFERENCES_H__

Powered by Google App Engine
This is Rietveld 408576698