OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef IOS_PUBLIC_PROVIDER_WEB_WEB_UI_IOS_CONTROLLER_H_ |
| 6 #define IOS_PUBLIC_PROVIDER_WEB_WEB_UI_IOS_CONTROLLER_H_ |
| 7 |
| 8 #include "base/basictypes.h" |
| 9 #include "base/strings/string16.h" |
| 10 |
| 11 class GURL; |
| 12 |
| 13 namespace base { |
| 14 class ListValue; |
| 15 } |
| 16 |
| 17 namespace web { |
| 18 |
| 19 class WebUIIOS; |
| 20 |
| 21 // A WebUIIOS page is controlled by the embedder's WebUIIOSController object. It |
| 22 // manages the data source and message handlers. |
| 23 class WebUIIOSController { |
| 24 public: |
| 25 explicit WebUIIOSController(WebUIIOS* web_ui) : web_ui_(web_ui) {} |
| 26 virtual ~WebUIIOSController() {} |
| 27 |
| 28 // Allows the controller to override handling all messages from the page. |
| 29 // Return true if the message handling was overridden. |
| 30 virtual bool OverrideHandleWebUIIOSMessage(const GURL& source_url, |
| 31 const std::string& message, |
| 32 const base::ListValue& args); |
| 33 |
| 34 WebUIIOS* web_ui() const { return web_ui_; } |
| 35 |
| 36 private: |
| 37 WebUIIOS* web_ui_; |
| 38 }; |
| 39 |
| 40 } // namespace web |
| 41 |
| 42 #endif // IOS_PUBLIC_PROVIDER_WEB_WEB_UI_IOS_CONTROLLER_H_ |
OLD | NEW |