| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #ifndef UI_BASE_WEBUI_WEB_UI_UTIL_H_ | 5 #ifndef UI_BASE_WEBUI_WEB_UI_UTIL_H_ |
| 6 #define UI_BASE_WEBUI_WEB_UI_UTIL_H_ | 6 #define UI_BASE_WEBUI_WEB_UI_UTIL_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 std::string* path, | 43 std::string* path, |
| 44 float* scale_factor); | 44 float* scale_factor); |
| 45 | 45 |
| 46 // Helper function to set some default values (e.g., font family, size, | 46 // Helper function to set some default values (e.g., font family, size, |
| 47 // language, and text direction) into the given dictionary. Requires an | 47 // language, and text direction) into the given dictionary. Requires an |
| 48 // application locale (i.e. g_browser_process->GetApplicationLocale()). | 48 // application locale (i.e. g_browser_process->GetApplicationLocale()). |
| 49 UI_BASE_EXPORT void SetLoadTimeDataDefaults( | 49 UI_BASE_EXPORT void SetLoadTimeDataDefaults( |
| 50 const std::string& app_locale, | 50 const std::string& app_locale, |
| 51 base::DictionaryValue* localized_strings); | 51 base::DictionaryValue* localized_strings); |
| 52 | 52 |
| 53 // Get a CSS declaration for common text styles using provided template. |
| 54 UI_BASE_EXPORT std::string GetWebUiCssTextDefaults( |
| 55 const std::string& css_template); |
| 56 |
| 53 // Get a CSS declaration for common text styles for all of Web UI. | 57 // Get a CSS declaration for common text styles for all of Web UI. |
| 54 UI_BASE_EXPORT std::string GetWebUiCssTextDefaults(); | 58 UI_BASE_EXPORT std::string GetWebUiCssTextDefaults(); |
| 55 | 59 |
| 60 // Get a CSS declaration for common text styles for Web UI using |
| 61 // Material Design. |
| 62 UI_BASE_EXPORT std::string GetWebUiCssTextDefaultsMd(); |
| 63 |
| 56 // Appends the CSS declaration returned by GetWebUiCssTextDefaults() as an | 64 // Appends the CSS declaration returned by GetWebUiCssTextDefaults() as an |
| 57 // inline stylesheet. | 65 // inline stylesheet. |
| 58 UI_BASE_EXPORT void AppendWebUiCssTextDefaults(std::string* html); | 66 UI_BASE_EXPORT void AppendWebUiCssTextDefaults(std::string* html); |
| 59 | 67 |
| 60 // Get some common font styles for all of WebUI. | 68 // Get some common font styles for all of WebUI. |
| 61 UI_BASE_EXPORT std::string GetFontFamily(); | 69 UI_BASE_EXPORT std::string GetFontFamily(); |
| 62 UI_BASE_EXPORT std::string GetFontSize(); | 70 UI_BASE_EXPORT std::string GetFontSize(); |
| 63 UI_BASE_EXPORT std::string GetTextDirection(); | 71 UI_BASE_EXPORT std::string GetTextDirection(); |
| 64 | 72 |
| 65 } // namespace webui | 73 } // namespace webui |
| 66 | 74 |
| 67 #endif // UI_BASE_WEBUI_WEB_UI_UTIL_H_ | 75 #endif // UI_BASE_WEBUI_WEB_UI_UTIL_H_ |
| OLD | NEW |