OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef IOS_WEB_PUBLIC_WEB_VIEW_CREATION_UTIL_H_ | 5 #ifndef IOS_WEB_PUBLIC_WEB_VIEW_CREATION_UTIL_H_ |
6 #define IOS_WEB_PUBLIC_WEB_VIEW_CREATION_UTIL_H_ | 6 #define IOS_WEB_PUBLIC_WEB_VIEW_CREATION_UTIL_H_ |
7 | 7 |
8 #import <CoreGraphics/CoreGraphics.h> | 8 #import <CoreGraphics/CoreGraphics.h> |
| 9 #import <Foundation/Foundation.h> |
9 | 10 |
10 @class WKWebView; | 11 @class WKWebView; |
11 | 12 |
12 namespace web { | 13 namespace web { |
13 class BrowserState; | 14 class BrowserState; |
14 | 15 |
15 // Returns a new WKWebView for displaying regular web content. | 16 // Returns a new WKWebView for displaying regular web content. |
16 // WKWebViewConfiguration object for resulting web view will be obtained from | 17 // WKWebViewConfiguration object for resulting web view will be obtained from |
17 // the given |browser_state|. | 18 // the given |browser_state|. |
18 // | 19 // |
19 // Preconditions for creation of a WKWebView: | 20 // Preconditions for creation of a WKWebView: |
20 // 1) |browser_state| is not null. | 21 // 1) |browser_state| is not null. |
21 // 2) web::BrowsingDataPartition is synchronized. | 22 // 2) web::BrowsingDataPartition is synchronized. |
22 // | 23 // |
23 // Note: Callers are responsible for releasing the returned WKWebView. | 24 // Note: Callers are responsible for releasing the returned WKWebView. |
24 WKWebView* CreateWKWebView(CGRect frame, BrowserState* browser_state); | 25 WKWebView* CreateWKWebView(CGRect frame, |
| 26 BrowserState* browser_state) NS_RETURNS_RETAINED; |
25 | 27 |
26 } // web | 28 } // web |
27 | 29 |
28 #endif // IOS_WEB_PUBLIC_WEB_VIEW_CREATION_UTIL_H_ | 30 #endif // IOS_WEB_PUBLIC_WEB_VIEW_CREATION_UTIL_H_ |
OLD | NEW |