| 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 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 string16 fixed_font_family; | |
| 34 string16 serif_font_family; | |
| 35 string16 sans_serif_font_family; | |
| 36 string16 cursive_font_family; | |
| 37 string16 fantasy_font_family; | |
| 38 ScriptFontFamilyMap standard_font_family_map; | 33 ScriptFontFamilyMap standard_font_family_map; |
| 39 ScriptFontFamilyMap fixed_font_family_map; | 34 ScriptFontFamilyMap fixed_font_family_map; |
| 40 ScriptFontFamilyMap serif_font_family_map; | 35 ScriptFontFamilyMap serif_font_family_map; |
| 41 ScriptFontFamilyMap sans_serif_font_family_map; | 36 ScriptFontFamilyMap sans_serif_font_family_map; |
| 42 ScriptFontFamilyMap cursive_font_family_map; | 37 ScriptFontFamilyMap cursive_font_family_map; |
| 43 ScriptFontFamilyMap fantasy_font_family_map; | 38 ScriptFontFamilyMap fantasy_font_family_map; |
| 44 int default_font_size; | 39 int default_font_size; |
| 45 int default_fixed_font_size; | 40 int default_fixed_font_size; |
| 46 int minimum_font_size; | 41 int minimum_font_size; |
| 47 int minimum_logical_font_size; | 42 int minimum_logical_font_size; |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 // the embedder to use the same default value. | 121 // the embedder to use the same default value. |
| 127 WebPreferences(); | 122 WebPreferences(); |
| 128 ~WebPreferences(); | 123 ~WebPreferences(); |
| 129 | 124 |
| 130 void Apply(WebKit::WebView* web_view) const; | 125 void Apply(WebKit::WebView* web_view) const; |
| 131 }; | 126 }; |
| 132 | 127 |
| 133 } // namespace webkit_glue | 128 } // namespace webkit_glue |
| 134 | 129 |
| 135 #endif // WEBKIT_GLUE_WEBPREFERENCES_H__ | 130 #endif // WEBKIT_GLUE_WEBPREFERENCES_H__ |
| OLD | NEW |