Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4733)

Unified Diff: chrome/browser/ui/webui/options/font_settings_handler.cc

Issue 1995113002: Rename WebUI::CallJavascriptFunction to WebUI::CallJavascriptFunctionUnsafe (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/webui/options/font_settings_handler.cc
diff --git a/chrome/browser/ui/webui/options/font_settings_handler.cc b/chrome/browser/ui/webui/options/font_settings_handler.cc
index 4c7ae3a2eb2e590ff822e1627c6f4e742526a459..4a87924f989f87ab5c8494e52163081408632201 100644
--- a/chrome/browser/ui/webui/options/font_settings_handler.cc
+++ b/chrome/browser/ui/webui/options/font_settings_handler.cc
@@ -252,43 +252,42 @@ void FontSettingsHandler::FontsListHasLoaded(
MaybeGetLocalizedFontName(fixed_font_.GetValue()));
selected_values.AppendString(font_encoding_.GetValue());
- web_ui()->CallJavascriptFunction("FontSettings.setFontsData",
- *list.get(), encoding_list,
- selected_values);
+ web_ui()->CallJavascriptFunctionUnsafe(
+ "FontSettings.setFontsData", *list.get(), encoding_list, selected_values);
}
void FontSettingsHandler::SetUpStandardFontSample() {
base::StringValue font_value(standard_font_.GetValue());
base::FundamentalValue size_value(default_font_size_.GetValue());
- web_ui()->CallJavascriptFunction(
- "FontSettings.setUpStandardFontSample", font_value, size_value);
+ web_ui()->CallJavascriptFunctionUnsafe("FontSettings.setUpStandardFontSample",
+ font_value, size_value);
}
void FontSettingsHandler::SetUpSerifFontSample() {
base::StringValue font_value(serif_font_.GetValue());
base::FundamentalValue size_value(default_font_size_.GetValue());
- web_ui()->CallJavascriptFunction(
- "FontSettings.setUpSerifFontSample", font_value, size_value);
+ web_ui()->CallJavascriptFunctionUnsafe("FontSettings.setUpSerifFontSample",
+ font_value, size_value);
}
void FontSettingsHandler::SetUpSansSerifFontSample() {
base::StringValue font_value(sans_serif_font_.GetValue());
base::FundamentalValue size_value(default_font_size_.GetValue());
- web_ui()->CallJavascriptFunction(
+ web_ui()->CallJavascriptFunctionUnsafe(
"FontSettings.setUpSansSerifFontSample", font_value, size_value);
}
void FontSettingsHandler::SetUpFixedFontSample() {
base::StringValue font_value(fixed_font_.GetValue());
base::FundamentalValue size_value(default_fixed_font_size_.GetValue());
- web_ui()->CallJavascriptFunction(
- "FontSettings.setUpFixedFontSample", font_value, size_value);
+ web_ui()->CallJavascriptFunctionUnsafe("FontSettings.setUpFixedFontSample",
+ font_value, size_value);
}
void FontSettingsHandler::SetUpMinimumFontSample() {
base::FundamentalValue size_value(minimum_font_size_.GetValue());
- web_ui()->CallJavascriptFunction("FontSettings.setUpMinimumFontSample",
- size_value);
+ web_ui()->CallJavascriptFunctionUnsafe("FontSettings.setUpMinimumFontSample",
+ size_value);
}
const extensions::Extension*
@@ -302,7 +301,7 @@ FontSettingsHandler::GetAdvancedFontSettingsExtension() {
}
void FontSettingsHandler::NotifyAdvancedFontSettingsAvailability() {
- web_ui()->CallJavascriptFunction(
+ web_ui()->CallJavascriptFunctionUnsafe(
"FontSettings.notifyAdvancedFontSettingsAvailability",
base::FundamentalValue(GetAdvancedFontSettingsExtension() != NULL));
}
« no previous file with comments | « chrome/browser/ui/webui/options/easy_unlock_handler.cc ('k') | chrome/browser/ui/webui/options/geolocation_options_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698