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_PUBLIC_WEB_VIEW_CREATION_UTIL_H_
6 #define IOS_WEB_PUBLIC_WEB_VIEW_CREATION_UTIL_H_
8 #import <CoreGraphics/CoreGraphics.h>
15 // Returns true if WKWebView is supported on current OS/platform/arch.
16 bool IsWKWebViewSupported();
18 // Returns a new WKWebView for displaying regular web content.
19 // WKWebViewConfiguration object for resulting web view will be obtained from
20 // the given |browser_state|.
22 // Preconditions for creation of a WKWebView:
23 // 1) |browser_state| is not null.
24 // 2) web::BrowsingDataPartition is synchronized.
26 // Note: Callers are responsible for releasing the returned WKWebView.
27 WKWebView
* CreateWKWebView(CGRect frame
, BrowserState
* browser_state
);
31 #endif // IOS_WEB_PUBLIC_WEB_VIEW_CREATION_UTIL_H_