1 // Copyright 2013 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_CRW_WEB_VIEW_PROXY_H_
6 #define IOS_WEB_PUBLIC_WEB_STATE_CRW_WEB_VIEW_PROXY_H_
8 #import <UIKit/UIKit.h>
10 #include "ios/web/public/web_view_type.h"
12 @
class CRWWebViewScrollViewProxy
;
14 // Provides an interface for embedders to access the WebState's UIWebView in a
15 // limited and controlled manner.
16 // TODO(kkhorimoto): rename protocol to CRWContentViewProxy.
17 @protocol CRWWebViewProxy
<NSObject
>
19 // The UIWebView's bounding rectangle (relative to its parent).
20 @
property(readonly
, assign
) CGRect bounds
;
22 // A Boolean value indicating whether web content can programmatically display
24 @
property(nonatomic
, assign
) BOOL keyboardDisplayRequiresUserAction
;
26 // Gives the embedder access to the UIWebView's UIScrollView in a limited and
28 @
property(nonatomic
, readonly
) CRWWebViewScrollViewProxy
* scrollViewProxy
;
30 // Returns the webview's gesture recognizers.
31 @
property(nonatomic
, readonly
) NSArray
* gestureRecognizers
;
33 // Retuns the type of the web view this proxy manages.
34 @
property(nonatomic
, readonly
) web::WebViewType webViewType
;
36 // Register the given insets for the given caller.
37 - (void)registerInsets
:(UIEdgeInsets
)insets forCaller
:(id
)caller
;
39 // Unregister the registered insets for the given caller.
40 - (void)unregisterInsetsForCaller
:(id
)caller
;
42 // Wrapper around the addSubview method of the webview.
43 - (void)addSubview
:(UIView
*)view
;
45 // Returns YES if it makes sense to search for text right now.
46 - (BOOL
)hasSearchableTextContent
;
48 // Returns the currently visible keyboard accessory, or nil.
49 - (UIView
*)getKeyboardAccessory
;
53 #endif // IOS_WEB_PUBLIC_WEB_STATE_CRW_WEB_VIEW_PROXY_H_