blob: 1a94030a578942af6ba81711aa36fbbeb16a2075 [file] [log] [blame]
// Copyright 2019 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef IOS_WEB_WEB_STATE_UI_CRW_WK_UI_HANDLER_DELEGATE_H_
#define IOS_WEB_WEB_STATE_UI_CRW_WK_UI_HANDLER_DELEGATE_H_
#import <WebKit/WebKit.h>
#import "ios/web/web_state/ui/crw_web_view_handler_delegate.h"
@class CRWWKUIHandler;
namespace web {
class WebState;
}
// Delegate for the CRWWKUIHandler.
@protocol CRWWKUIHandlerDelegate <CRWWebViewHandlerDelegate>
// Creates and returns a web view with given |config|, in the |webController|.
- (WKWebView*)UIHandler:(CRWWKUIHandler*)UIHandler
createWebViewWithConfiguration:(WKWebViewConfiguration*)configuration
forWebState:(web::WebState*)webState;
// Returns whether the the action is user initiated.
- (BOOL)UIHandler:(CRWWKUIHandler*)UIHandler
isUserInitiatedAction:(WKNavigationAction*)action;
@end
#endif // IOS_WEB_WEB_STATE_UI_CRW_WK_UI_HANDLER_DELEGATE_H_