Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(705)

Side by Side Diff: ios/web/web_state/web_view_internal_creation_util.h

Issue 2239773002: Annotates functions returning retained objects. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ios/web/test/wk_web_view_crash_utils.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_WEB_STATE_WEB_VIEW_INTERNAL_CREATION_UTIL_H_ 5 #ifndef IOS_WEB_WEB_STATE_WEB_VIEW_INTERNAL_CREATION_UTIL_H_
6 #define IOS_WEB_WEB_STATE_WEB_VIEW_INTERNAL_CREATION_UTIL_H_ 6 #define IOS_WEB_WEB_STATE_WEB_VIEW_INTERNAL_CREATION_UTIL_H_
7 7
8 #import <CoreGraphics/CoreGraphics.h> 8 #import <CoreGraphics/CoreGraphics.h>
9 #import <WebKit/WebKit.h> 9 #import <WebKit/WebKit.h>
10 10
11 // This file is a collection of functions that vend web views. 11 // This file is a collection of functions that vend web views.
12 namespace web { 12 namespace web {
13 class BrowserState; 13 class BrowserState;
14 14
15 // Creates a new WKWebView for displaying regular web content and registers a 15 // Creates a new WKWebView for displaying regular web content and registers a
16 // user agent for it. 16 // user agent for it.
17 // 17 //
18 // Preconditions for creation of a WKWebView: 18 // Preconditions for creation of a WKWebView:
19 // 1) |browser_state|, |configuration| are not null. 19 // 1) |browser_state|, |configuration| are not null.
20 // 2) web::BrowsingDataPartition is synchronized. 20 // 2) web::BrowsingDataPartition is synchronized.
21 // 3) The WKProcessPool of the configuration is the same as the WKProcessPool 21 // 3) The WKProcessPool of the configuration is the same as the WKProcessPool
22 // of the WKWebViewConfiguration associated with |browser_state|. 22 // of the WKWebViewConfiguration associated with |browser_state|.
23 // 23 //
24 // Note: Callers are responsible for releasing the returned WKWebView. 24 // Note: Callers are responsible for releasing the returned WKWebView.
25 WKWebView* CreateWKWebView(CGRect frame, 25 WKWebView* CreateWKWebView(CGRect frame,
26 WKWebViewConfiguration* configuration, 26 WKWebViewConfiguration* configuration,
27 BrowserState* browser_state, 27 BrowserState* browser_state,
28 BOOL use_desktop_user_agent); 28 BOOL use_desktop_user_agent) NS_RETURNS_RETAINED;
29 29
30 // Creates and returns a new WKWebView for displaying regular web content. 30 // Creates and returns a new WKWebView for displaying regular web content.
31 // The preconditions for the creation of a WKWebView are the same as the 31 // The preconditions for the creation of a WKWebView are the same as the
32 // previous method. 32 // previous method.
33 // Note: Callers are responsible for releasing the returned WKWebView. 33 // Note: Callers are responsible for releasing the returned WKWebView.
34 WKWebView* CreateWKWebView(CGRect frame, 34 WKWebView* CreateWKWebView(CGRect frame,
35 WKWebViewConfiguration* configuration, 35 WKWebViewConfiguration* configuration,
36 BrowserState* browser_state); 36 BrowserState* browser_state) NS_RETURNS_RETAINED;
37 37
38 } // namespace web 38 } // namespace web
39 39
40 #endif // IOS_WEB_WEB_STATE_WEB_VIEW_INTERNAL_CREATION_UTIL_H_ 40 #endif // IOS_WEB_WEB_STATE_WEB_VIEW_INTERNAL_CREATION_UTIL_H_
OLDNEW
« no previous file with comments | « ios/web/test/wk_web_view_crash_utils.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698