| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <string> | 14 #include <string> |
| 15 #include <vector> | 15 #include <vector> |
| 16 | 16 |
| 17 #include "base/string16.h" | 17 #include "base/string16.h" |
| 18 #include "googleurl/src/gurl.h" | 18 #include "googleurl/src/gurl.h" |
| 19 | 19 |
| 20 namespace WebKit { | 20 namespace WebKit { |
| 21 class WebView; | 21 class WebView; |
| 22 } | 22 } |
| 23 | 23 |
| 24 struct WebPreferences { | 24 struct WebPreferences { |
| 25 // Map of ISO 15924 four-letter script code to font family. For example, |
| 26 // "Arab" to "My Arabic Font". |
| 27 typedef std::vector<std::pair<std::string, string16> > ScriptFontFamilyMap; |
| 28 |
| 25 string16 standard_font_family; | 29 string16 standard_font_family; |
| 26 string16 fixed_font_family; | 30 string16 fixed_font_family; |
| 27 string16 serif_font_family; | 31 string16 serif_font_family; |
| 28 string16 sans_serif_font_family; | 32 string16 sans_serif_font_family; |
| 29 string16 cursive_font_family; | 33 string16 cursive_font_family; |
| 30 string16 fantasy_font_family; | 34 string16 fantasy_font_family; |
| 35 ScriptFontFamilyMap standard_font_family_map; |
| 36 ScriptFontFamilyMap fixed_font_family_map; |
| 37 ScriptFontFamilyMap serif_font_family_map; |
| 38 ScriptFontFamilyMap sans_serif_font_family_map; |
| 39 ScriptFontFamilyMap cursive_font_family_map; |
| 40 ScriptFontFamilyMap fantasy_font_family_map; |
| 31 int default_font_size; | 41 int default_font_size; |
| 32 int default_fixed_font_size; | 42 int default_fixed_font_size; |
| 33 int minimum_font_size; | 43 int minimum_font_size; |
| 34 int minimum_logical_font_size; | 44 int minimum_logical_font_size; |
| 35 std::string default_encoding; | 45 std::string default_encoding; |
| 36 bool javascript_enabled; | 46 bool javascript_enabled; |
| 37 bool web_security_enabled; | 47 bool web_security_enabled; |
| 38 bool javascript_can_open_windows_automatically; | 48 bool javascript_can_open_windows_automatically; |
| 39 bool loads_images_automatically; | 49 bool loads_images_automatically; |
| 40 bool plugins_enabled; | 50 bool plugins_enabled; |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 // We try to keep the default values the same as the default values in | 107 // We try to keep the default values the same as the default values in |
| 98 // chrome, except for the cases where it would require lots of extra work for | 108 // chrome, except for the cases where it would require lots of extra work for |
| 99 // the embedder to use the same default value. | 109 // the embedder to use the same default value. |
| 100 WebPreferences(); | 110 WebPreferences(); |
| 101 ~WebPreferences(); | 111 ~WebPreferences(); |
| 102 | 112 |
| 103 void Apply(WebKit::WebView* web_view) const; | 113 void Apply(WebKit::WebView* web_view) const; |
| 104 }; | 114 }; |
| 105 | 115 |
| 106 #endif // WEBKIT_GLUE_WEBPREFERENCES_H__ | 116 #endif // WEBKIT_GLUE_WEBPREFERENCES_H__ |
| OLD | NEW |