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.
5 #ifndef IOS_PUBLIC_PROVIDER_WEB_WEB_UI_IOS_CONTROLLER_H_
6 #define IOS_PUBLIC_PROVIDER_WEB_WEB_UI_IOS_CONTROLLER_H_
8 #include "base/basictypes.h"
9 #include "base/strings/string16.h"
21 // A WebUIIOS page is controlled by the embedder's WebUIIOSController object. It
22 // manages the data source and message handlers.
23 class WebUIIOSController
{
25 explicit WebUIIOSController(WebUIIOS
* web_ui
) : web_ui_(web_ui
) {}
26 virtual ~WebUIIOSController() {}
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
);
34 WebUIIOS
* web_ui() const { return web_ui_
; }
42 #endif // IOS_PUBLIC_PROVIDER_WEB_WEB_UI_IOS_CONTROLLER_H_