| OLD | NEW |
| 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 struct WEBKIT_GLUE_EXPORT WebPreferences { | 26 struct WEBKIT_GLUE_EXPORT WebPreferences { |
| 26 // Map of ISO 15924 four-letter script code to font family. For example, | 27 // Map of ISO 15924 four-letter script code to font family. For example, |
| 27 // "Arab" to "My Arabic Font". | 28 // "Arab" to "My Arabic Font". |
| 28 typedef std::vector<std::pair<std::string, string16> > ScriptFontFamilyMap; | 29 typedef std::map<std::string, string16> ScriptFontFamilyMap; |
| 29 | 30 |
| 30 string16 standard_font_family; | |
| 31 string16 fixed_font_family; | |
| 32 string16 serif_font_family; | |
| 33 string16 sans_serif_font_family; | |
| 34 string16 cursive_font_family; | |
| 35 string16 fantasy_font_family; | |
| 36 ScriptFontFamilyMap standard_font_family_map; | 31 ScriptFontFamilyMap standard_font_family_map; |
| 37 ScriptFontFamilyMap fixed_font_family_map; | 32 ScriptFontFamilyMap fixed_font_family_map; |
| 38 ScriptFontFamilyMap serif_font_family_map; | 33 ScriptFontFamilyMap serif_font_family_map; |
| 39 ScriptFontFamilyMap sans_serif_font_family_map; | 34 ScriptFontFamilyMap sans_serif_font_family_map; |
| 40 ScriptFontFamilyMap cursive_font_family_map; | 35 ScriptFontFamilyMap cursive_font_family_map; |
| 41 ScriptFontFamilyMap fantasy_font_family_map; | 36 ScriptFontFamilyMap fantasy_font_family_map; |
| 42 int default_font_size; | 37 int default_font_size; |
| 43 int default_fixed_font_size; | 38 int default_fixed_font_size; |
| 44 int minimum_font_size; | 39 int minimum_font_size; |
| 45 int minimum_logical_font_size; | 40 int minimum_logical_font_size; |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 // We try to keep the default values the same as the default values in | 117 // We try to keep the default values the same as the default values in |
| 123 // chrome, except for the cases where it would require lots of extra work for | 118 // chrome, except for the cases where it would require lots of extra work for |
| 124 // the embedder to use the same default value. | 119 // the embedder to use the same default value. |
| 125 WebPreferences(); | 120 WebPreferences(); |
| 126 ~WebPreferences(); | 121 ~WebPreferences(); |
| 127 | 122 |
| 128 void Apply(WebKit::WebView* web_view) const; | 123 void Apply(WebKit::WebView* web_view) const; |
| 129 }; | 124 }; |
| 130 | 125 |
| 131 #endif // WEBKIT_GLUE_WEBPREFERENCES_H__ | 126 #endif // WEBKIT_GLUE_WEBPREFERENCES_H__ |
| OLD | NEW |