Chromium Code Reviews| 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 typedef std::vector<std::pair<std::string, string16> > ScriptFontFamilyMap; | |
|
brettw
2011/08/22 23:23:28
Can you provide a comment here what this is mappin
falken
2011/08/23 12:05:53
Done.
| |
| 25 string16 standard_font_family; | 26 string16 standard_font_family; |
| 26 string16 fixed_font_family; | 27 string16 fixed_font_family; |
| 27 string16 serif_font_family; | 28 string16 serif_font_family; |
| 28 string16 sans_serif_font_family; | 29 string16 sans_serif_font_family; |
| 29 string16 cursive_font_family; | 30 string16 cursive_font_family; |
| 30 string16 fantasy_font_family; | 31 string16 fantasy_font_family; |
| 32 ScriptFontFamilyMap standard_font_family_map; | |
| 33 ScriptFontFamilyMap fixed_font_family_map; | |
| 34 ScriptFontFamilyMap serif_font_family_map; | |
| 35 ScriptFontFamilyMap sans_serif_font_family_map; | |
| 36 ScriptFontFamilyMap cursive_font_family_map; | |
| 37 ScriptFontFamilyMap fantasy_font_family_map; | |
| 31 int default_font_size; | 38 int default_font_size; |
| 32 int default_fixed_font_size; | 39 int default_fixed_font_size; |
| 33 int minimum_font_size; | 40 int minimum_font_size; |
| 34 int minimum_logical_font_size; | 41 int minimum_logical_font_size; |
| 35 std::string default_encoding; | 42 std::string default_encoding; |
| 36 bool javascript_enabled; | 43 bool javascript_enabled; |
| 37 bool web_security_enabled; | 44 bool web_security_enabled; |
| 38 bool javascript_can_open_windows_automatically; | 45 bool javascript_can_open_windows_automatically; |
| 39 bool loads_images_automatically; | 46 bool loads_images_automatically; |
| 40 bool plugins_enabled; | 47 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 | 104 // 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 | 105 // chrome, except for the cases where it would require lots of extra work for |
| 99 // the embedder to use the same default value. | 106 // the embedder to use the same default value. |
| 100 WebPreferences(); | 107 WebPreferences(); |
| 101 ~WebPreferences(); | 108 ~WebPreferences(); |
| 102 | 109 |
| 103 void Apply(WebKit::WebView* web_view) const; | 110 void Apply(WebKit::WebView* web_view) const; |
| 104 }; | 111 }; |
| 105 | 112 |
| 106 #endif // WEBKIT_GLUE_WEBPREFERENCES_H__ | 113 #endif // WEBKIT_GLUE_WEBPREFERENCES_H__ |
| OLD | NEW |