| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef IOS_PUBLIC_PROVIDER_WEB_WEB_UI_IOS_CONTROLLER_H_ | 5 #ifndef IOS_PUBLIC_PROVIDER_WEB_WEB_UI_IOS_CONTROLLER_H_ |
| 6 #define IOS_PUBLIC_PROVIDER_WEB_WEB_UI_IOS_CONTROLLER_H_ | 6 #define IOS_PUBLIC_PROVIDER_WEB_WEB_UI_IOS_CONTROLLER_H_ |
| 7 | 7 |
| 8 #include "base/strings/string16.h" | 8 // TODO(crbug.com/524467): Remove this file once downstream code is switched to |
| 9 | 9 // use correct header. |
| 10 class GURL; | 10 #include "ios/web/public/webui/web_ui_ios_controller.h" |
| 11 | |
| 12 namespace base { | |
| 13 class ListValue; | |
| 14 } | |
| 15 | |
| 16 namespace web { | |
| 17 | |
| 18 class WebUIIOS; | |
| 19 | |
| 20 // A WebUIIOS page is controlled by the embedder's WebUIIOSController object. It | |
| 21 // manages the data source and message handlers. | |
| 22 class WebUIIOSController { | |
| 23 public: | |
| 24 explicit WebUIIOSController(WebUIIOS* web_ui) : web_ui_(web_ui) {} | |
| 25 virtual ~WebUIIOSController() {} | |
| 26 | |
| 27 // Allows the controller to override handling all messages from the page. | |
| 28 // Return true if the message handling was overridden. | |
| 29 virtual bool OverrideHandleWebUIIOSMessage(const GURL& source_url, | |
| 30 const std::string& message, | |
| 31 const base::ListValue& args); | |
| 32 | |
| 33 WebUIIOS* web_ui() const { return web_ui_; } | |
| 34 | |
| 35 private: | |
| 36 WebUIIOS* web_ui_; | |
| 37 }; | |
| 38 | |
| 39 } // namespace web | |
| 40 | 11 |
| 41 #endif // IOS_PUBLIC_PROVIDER_WEB_WEB_UI_IOS_CONTROLLER_H_ | 12 #endif // IOS_PUBLIC_PROVIDER_WEB_WEB_UI_IOS_CONTROLLER_H_ |
| OLD | NEW |