Index: ios/public/provider/web/web_ui_ios.h |
diff --git a/ios/public/provider/web/web_ui_ios.h b/ios/public/provider/web/web_ui_ios.h |
index 3cfd70177aecf429696373b0b56be604a285a2c5..65e61e08b9d91eca87050df2e84c3e8c44c4c69c 100644 |
--- a/ios/public/provider/web/web_ui_ios.h |
+++ b/ios/public/provider/web/web_ui_ios.h |
@@ -5,82 +5,8 @@ |
#ifndef IOS_PUBLIC_PROVIDER_WEB_WEB_UI_IOS_H_ |
#define IOS_PUBLIC_PROVIDER_WEB_WEB_UI_IOS_H_ |
-#include <vector> |
- |
-#include "base/callback.h" |
-#include "base/strings/string16.h" |
- |
-class GURL; |
- |
-namespace base { |
-class ListValue; |
-class Value; |
-} |
- |
-namespace web { |
- |
-class WebState; |
-class WebUIIOSController; |
-class WebUIIOSMessageHandler; |
- |
-// A WebUIIOS sets up the datasources and message handlers for a given |
-// HTML-based UI. |
-class WebUIIOS { |
- public: |
- // Returns JavaScript code that, when executed, calls the function specified |
- // by |function_name| with the arguments specified in |arg_list|. |
- static base::string16 GetJavascriptCall( |
- const std::string& function_name, |
- const std::vector<const base::Value*>& arg_list); |
- |
- virtual ~WebUIIOS() {} |
- |
- virtual web::WebState* GetWebState() const = 0; |
- |
- virtual WebUIIOSController* GetController() const = 0; |
- virtual void SetController(WebUIIOSController* controller) = 0; |
- |
- // Takes ownership of |handler|, which will be destroyed when the WebUIIOS is. |
- virtual void AddMessageHandler(WebUIIOSMessageHandler* handler) = 0; |
- |
- // Used by WebUIIOSMessageHandlers. If the given message is already |
- // registered, the call has no effect unless |register_callback_overwrites_| |
- // is set to true. |
- typedef base::Callback<void(const base::ListValue*)> MessageCallback; |
- virtual void RegisterMessageCallback(const std::string& message, |
- const MessageCallback& callback) = 0; |
- |
- // This is only needed if an embedder overrides handling of a WebUIIOSMessage |
- // and then later wants to undo that, or to route it to a different WebUIIOS |
- // object. |
- virtual void ProcessWebUIIOSMessage(const GURL& source_url, |
- const std::string& message, |
- const base::ListValue& args) = 0; |
- |
- // Call a Javascript function. This is asynchronous; there's no way to get |
- // the result of the call, and should be thought of more like sending a |
- // message to the page. 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( |
- const std::string& function_name, |
- const std::vector<const base::Value*>& args) = 0; |
-}; |
- |
-} // namespace web |
+// TODO(crbug.com/524467): Remove this file once downstream code is switched to |
+// use correct header. |
+#include "ios/web/public/webui/web_ui_ios.h" |
#endif // IOS_PUBLIC_PROVIDER_WEB_WEB_UI_IOS_H_ |