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_WEB_WEB_STATE_UI_CRW_UI_WEB_VIEW_WEB_CONTROLLER_H_
6 #define IOS_WEB_WEB_STATE_UI_CRW_UI_WEB_VIEW_WEB_CONTROLLER_H_
8 #import <UIKit/UIKit.h>
10 #import "ios/web/web_state/crw_recurring_task_delegate.h"
11 #import "ios/web/web_state/ui/crw_web_controller.h"
15 // Continuous JavaScript check timer frequency constants (exposed for tests).
16 extern const int64 kContinuousCheckIntervalMSHigh
;
17 extern const int64 kContinuousCheckIntervalMSLow
;
21 @
class CRWJSInvokeParameterQueue
;
23 // A concrete implementation of CRWWebController based on UIWebView.
24 @interface CRWUIWebViewWebController
:
25 CRWWebController
<CRWRecurringTaskDelegate
>
27 // Designated initializer.
28 - (instancetype
)initWithWebState
:(scoped_ptr
<web::WebStateImpl
>)webState
;
34 @interface
CRWUIWebViewWebController (UsedOnlyForTesting
)
35 // Queued message strings received from JavaScript and deferred for processing.
36 @
property(nonatomic
, readonly
)
37 CRWJSInvokeParameterQueue
* jsInvokeParameterQueue
;
38 // Used by tests to measure time taken to inject JavaScript.
39 @
property(nonatomic
, readonly
)
40 id
<CRWRecurringTaskDelegate
> recurringTaskDelegate
;
41 // Acts on the queue of messages received from the JS object encoded as
42 // JSON in plain text.
43 - (BOOL
)respondToMessageQueue
:(NSString
*)messageQueue
44 userIsInteracting
:(BOOL
)userIsInteracting
45 originURL
:(const GURL
&)originURL
;
48 #endif // IOS_WEB_WEB_STATE_UI_CRW_UI_WEB_VIEW_WEB_CONTROLLER_H_