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

Unified Diff: chrome/browser/ui/webui/chromeos/first_run/first_run_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/chromeos/first_run/first_run_handler.cc
diff --git a/chrome/browser/ui/webui/chromeos/first_run/first_run_handler.cc b/chrome/browser/ui/webui/chromeos/first_run/first_run_handler.cc
index faf3e5001f8a29cf46fd1daf88c46693054d1a86..2dcf9da1fed3d3dd066a5f07f29b40101e6d63b5 100644
--- a/chrome/browser/ui/webui/chromeos/first_run/first_run_handler.cc
+++ b/chrome/browser/ui/webui/chromeos/first_run/first_run_handler.cc
@@ -20,34 +20,31 @@ bool FirstRunHandler::IsInitialized() {
}
void FirstRunHandler::SetBackgroundVisible(bool visible) {
- web_ui()->CallJavascriptFunction("cr.FirstRun.setBackgroundVisible",
- base::FundamentalValue(visible));
+ web_ui()->CallJavascriptFunctionUnsafe("cr.FirstRun.setBackgroundVisible",
+ base::FundamentalValue(visible));
}
void FirstRunHandler::AddRectangularHole(int x, int y, int width, int height) {
- web_ui()->CallJavascriptFunction("cr.FirstRun.addRectangularHole",
- base::FundamentalValue(x),
- base::FundamentalValue(y),
- base::FundamentalValue(width),
- base::FundamentalValue(height));
+ web_ui()->CallJavascriptFunctionUnsafe(
+ "cr.FirstRun.addRectangularHole", base::FundamentalValue(x),
+ base::FundamentalValue(y), base::FundamentalValue(width),
+ base::FundamentalValue(height));
}
void FirstRunHandler::AddRoundHole(int x, int y, float radius) {
- web_ui()->CallJavascriptFunction("cr.FirstRun.addRoundHole",
- base::FundamentalValue(x),
- base::FundamentalValue(y),
- base::FundamentalValue(radius));
+ web_ui()->CallJavascriptFunctionUnsafe(
+ "cr.FirstRun.addRoundHole", base::FundamentalValue(x),
+ base::FundamentalValue(y), base::FundamentalValue(radius));
}
void FirstRunHandler::RemoveBackgroundHoles() {
- web_ui()->CallJavascriptFunction("cr.FirstRun.removeHoles");
+ web_ui()->CallJavascriptFunctionUnsafe("cr.FirstRun.removeHoles");
}
void FirstRunHandler::ShowStepPositioned(const std::string& name,
const StepPosition& position) {
- web_ui()->CallJavascriptFunction("cr.FirstRun.showStep",
- base::StringValue(name),
- *position.AsValue());
+ web_ui()->CallJavascriptFunctionUnsafe(
+ "cr.FirstRun.showStep", base::StringValue(name), *position.AsValue());
}
void FirstRunHandler::ShowStepPointingTo(const std::string& name,
@@ -59,19 +56,18 @@ void FirstRunHandler::ShowStepPointingTo(const std::string& name,
point_with_offset.AppendInteger(x);
point_with_offset.AppendInteger(y);
point_with_offset.AppendInteger(offset);
- web_ui()->CallJavascriptFunction("cr.FirstRun.showStep",
- base::StringValue(name),
- *null,
- point_with_offset);
+ web_ui()->CallJavascriptFunctionUnsafe("cr.FirstRun.showStep",
+ base::StringValue(name), *null,
+ point_with_offset);
}
void FirstRunHandler::HideCurrentStep() {
- web_ui()->CallJavascriptFunction("cr.FirstRun.hideCurrentStep");
+ web_ui()->CallJavascriptFunctionUnsafe("cr.FirstRun.hideCurrentStep");
}
void FirstRunHandler::Finalize() {
is_finalizing_ = true;
- web_ui()->CallJavascriptFunction("cr.FirstRun.finalize");
+ web_ui()->CallJavascriptFunctionUnsafe("cr.FirstRun.finalize");
}
bool FirstRunHandler::IsFinalizing() {

Powered by Google App Engine
This is Rietveld 408576698