1 // Copyright 2012 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_WEB_PUBLIC_WEB_STATE_UI_CRW_NATIVE_CONTENT_PROVIDER_H_
6 #define IOS_WEB_PUBLIC_WEB_STATE_UI_CRW_NATIVE_CONTENT_PROVIDER_H_
7 #import <UIKit/UIKit.h>
11 @protocol CRWNativeContent
;
13 // Provide a controller to a native view representing a given URL.
14 @protocol CRWNativeContentProvider
16 // Returns whether the Provider has a controller for the given URL.
17 - (BOOL
)hasControllerForURL
:(const GURL
&)url
;
19 // Returns an autoreleased controller for driving a native view contained
20 // within the web content area. This may return nil if the url is unsupported.
21 // |url| will be of the form "chrome://foo".
22 - (id
<CRWNativeContent
>)controllerForURL
:(const GURL
&)url
;
24 // Returns an autoreleased controller for driving a native view contained
25 // within the web content area. The native view will contain an error page
26 // with information appropriate for the problem described in |error|.
27 // |isPost| indicates whether the error was for a post request.
28 - (id
<CRWNativeContent
>)controllerForURL
:(const GURL
&)url
29 withError
:(NSError
*)error
34 #endif // IOS_WEB_PUBLIC_WEB_STATE_UI_CRW_NATIVE_CONTENT_PROVIDER_H_