Chromium Code Reviews| 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; |
| }; |