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

Side by Side Diff: webkit/glue/webpreferences.h

Issue 10107014: Migrate WebKit "global script" font prefs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync Created 8 years, 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ppapi/shared_impl/private/ppb_font_shared.cc ('k') | webkit/glue/webpreferences.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 // 4 //
5 // A struct for managing webkit's settings. 5 // A struct for managing webkit's settings.
6 // 6 //
7 // Adding new values to this class probably involves updating 7 // Adding new values to this class probably involves updating
8 // WebKit::WebSettings, common/render_messages.cc, browser/tab_contents/ 8 // WebKit::WebSettings, common/render_messages.cc, browser/tab_contents/
9 // render_view_host_delegate_helper.cc, and browser/profiles/profile.cc. 9 // render_view_host_delegate_helper.cc, and browser/profiles/profile.cc.
10 10
11 #ifndef WEBKIT_GLUE_WEBPREFERENCES_H__ 11 #ifndef WEBKIT_GLUE_WEBPREFERENCES_H__
12 #define WEBKIT_GLUE_WEBPREFERENCES_H__ 12 #define WEBKIT_GLUE_WEBPREFERENCES_H__
13 13
14 #include <map>
14 #include <string> 15 #include <string>
15 #include <vector> 16 #include <vector>
16 17
17 #include "base/string16.h" 18 #include "base/string16.h"
18 #include "googleurl/src/gurl.h" 19 #include "googleurl/src/gurl.h"
19 #include "webkit/glue/webkit_glue_export.h" 20 #include "webkit/glue/webkit_glue_export.h"
20 21
21 namespace WebKit { 22 namespace WebKit {
22 class WebView; 23 class WebView;
23 } 24 }
24 25
25 namespace webkit_glue { 26 namespace webkit_glue {
26 27
27 struct WEBKIT_GLUE_EXPORT WebPreferences { 28 struct WEBKIT_GLUE_EXPORT WebPreferences {
28 // Map of ISO 15924 four-letter script code to font family. For example, 29 // Map of ISO 15924 four-letter script code to font family. For example,
29 // "Arab" to "My Arabic Font". 30 // "Arab" to "My Arabic Font".
30 typedef std::vector<std::pair<std::string, string16> > ScriptFontFamilyMap; 31 typedef std::map<std::string, string16> ScriptFontFamilyMap;
31 32
32 string16 standard_font_family; 33 // The ISO 15924 script code for undetermined script aka Common. It's the
33 string16 fixed_font_family; 34 // default used on WebKit's side to get/set a font setting when no script is
34 string16 serif_font_family; 35 // specified.
35 string16 sans_serif_font_family; 36 static const char kCommonScript[];
36 string16 cursive_font_family; 37
37 string16 fantasy_font_family;
38 ScriptFontFamilyMap standard_font_family_map; 38 ScriptFontFamilyMap standard_font_family_map;
39 ScriptFontFamilyMap fixed_font_family_map; 39 ScriptFontFamilyMap fixed_font_family_map;
40 ScriptFontFamilyMap serif_font_family_map; 40 ScriptFontFamilyMap serif_font_family_map;
41 ScriptFontFamilyMap sans_serif_font_family_map; 41 ScriptFontFamilyMap sans_serif_font_family_map;
42 ScriptFontFamilyMap cursive_font_family_map; 42 ScriptFontFamilyMap cursive_font_family_map;
43 ScriptFontFamilyMap fantasy_font_family_map; 43 ScriptFontFamilyMap fantasy_font_family_map;
44 int default_font_size; 44 int default_font_size;
45 int default_fixed_font_size; 45 int default_fixed_font_size;
46 int minimum_font_size; 46 int minimum_font_size;
47 int minimum_logical_font_size; 47 int minimum_logical_font_size;
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 // the embedder to use the same default value. 126 // the embedder to use the same default value.
127 WebPreferences(); 127 WebPreferences();
128 ~WebPreferences(); 128 ~WebPreferences();
129 129
130 void Apply(WebKit::WebView* web_view) const; 130 void Apply(WebKit::WebView* web_view) const;
131 }; 131 };
132 132
133 } // namespace webkit_glue 133 } // namespace webkit_glue
134 134
135 #endif // WEBKIT_GLUE_WEBPREFERENCES_H__ 135 #endif // WEBKIT_GLUE_WEBPREFERENCES_H__
OLDNEW
« no previous file with comments | « ppapi/shared_impl/private/ppb_font_shared.cc ('k') | webkit/glue/webpreferences.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698