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

Unified Diff: content/public/browser/web_ui.h

Issue 1995113002: Rename WebUI::CallJavascriptFunction to WebUI::CallJavascriptFunctionUnsafe (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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: content/public/browser/web_ui.h
diff --git a/content/public/browser/web_ui.h b/content/public/browser/web_ui.h
index 8d45e28b8bdc64ae842bfa6d46d9979b0fab6e37..b97d7412561a6fd34317ec8e524dc3160fe98e04 100644
--- a/content/public/browser/web_ui.h
+++ b/content/public/browser/web_ui.h
@@ -95,7 +95,7 @@ class CONTENT_EXPORT WebUI {
virtual bool CanCallJavascript() = 0;
// Calling these functions directly is discouraged. It's generally preferred
- // to call WebUIMessageHandler::CallJavascriptFunction, as that has
+ // to call WebUIMessageHandler::CallJavascriptFunctionUnsafe, as that has
Charlie Reis 2016/05/23 20:26:00 This should still be CallJavascriptFunction.
tommycli 2016/06/03 17:52:44 Done.
// lifecycle controls to prevent calling JavaScript before the page is ready.
//
// Call a Javascript function by sending its name and arguments down to
@@ -105,22 +105,23 @@ class CONTENT_EXPORT WebUI {
//
// All function names in WebUI must consist of only ASCII characters.
// There are variants for calls with more arguments.
- virtual void CallJavascriptFunction(const std::string& function_name) = 0;
- virtual void CallJavascriptFunction(const std::string& function_name,
- const base::Value& arg) = 0;
- virtual void CallJavascriptFunction(const std::string& function_name,
- const base::Value& arg1,
- const base::Value& arg2) = 0;
- virtual void CallJavascriptFunction(const std::string& function_name,
- const base::Value& arg1,
- const base::Value& arg2,
- const base::Value& arg3) = 0;
- virtual void CallJavascriptFunction(const std::string& function_name,
- const base::Value& arg1,
- const base::Value& arg2,
- const base::Value& arg3,
- const base::Value& arg4) = 0;
- virtual void CallJavascriptFunction(
+ virtual void CallJavascriptFunctionUnsafe(
+ const std::string& function_name) = 0;
+ virtual void CallJavascriptFunctionUnsafe(const std::string& function_name,
+ const base::Value& arg) = 0;
+ virtual void CallJavascriptFunctionUnsafe(const std::string& function_name,
+ const base::Value& arg1,
+ const base::Value& arg2) = 0;
+ virtual void CallJavascriptFunctionUnsafe(const std::string& function_name,
+ const base::Value& arg1,
+ const base::Value& arg2,
+ const base::Value& arg3) = 0;
+ virtual void CallJavascriptFunctionUnsafe(const std::string& function_name,
+ const base::Value& arg1,
+ const base::Value& arg2,
+ const base::Value& arg3,
+ const base::Value& arg4) = 0;
+ virtual void CallJavascriptFunctionUnsafe(
const std::string& function_name,
const std::vector<const base::Value*>& args) = 0;
};

Powered by Google App Engine
This is Rietveld 408576698