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

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

Issue 2811073005: Replace requirePageReconstruction with setCustomUserAgent (Closed)
Patch Set: Remove unncessary if condition and add comments Created 3 years, 8 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
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 #include "ios/web/public/user_agent.h"
12
11 @protocol CRWContextMenuDelegate; 13 @protocol CRWContextMenuDelegate;
12 14
13 // This file is a collection of functions that vend web views. 15 // This file is a collection of functions that vend web views.
14 namespace web { 16 namespace web {
15 class BrowserState; 17 class BrowserState;
16 18
17 // Creates a new WKWebView for displaying regular web content and registers a 19 // Creates a new WKWebView for displaying regular web content and registers a
18 // user agent for it. 20 // user agent for it.
19 // 21 //
20 // Preconditions for creation of a WKWebView: 22 // Preconditions for creation of a WKWebView:
21 // 1) |browser_state|, |configuration| are not null. 23 // 1) |browser_state|, |configuration| are not null.
22 // 2) web::BrowsingDataPartition is synchronized. 24 // 2) web::BrowsingDataPartition is synchronized.
23 // 3) The WKProcessPool of the configuration is the same as the WKProcessPool 25 // 3) The WKProcessPool of the configuration is the same as the WKProcessPool
24 // of the WKWebViewConfiguration associated with |browser_state|. 26 // of the WKWebViewConfiguration associated with |browser_state|.
25 // 27 //
26 WKWebView* BuildWKWebView(CGRect frame, 28 WKWebView* BuildWKWebView(CGRect frame,
27 WKWebViewConfiguration* configuration, 29 WKWebViewConfiguration* configuration,
28 BrowserState* browser_state, 30 BrowserState* browser_state,
29 BOOL use_desktop_user_agent, 31 UserAgentType user_agent_type,
30 id<CRWContextMenuDelegate> context_menu_delegate); 32 id<CRWContextMenuDelegate> context_menu_delegate);
31 33
32 // Creates and returns a new WKWebView for displaying regular web content. 34 // Creates and returns a new WKWebView for displaying regular web content.
33 // The preconditions for the creation of a WKWebView are the same as the 35 // The preconditions for the creation of a WKWebView are the same as the
34 // previous method. 36 // previous method.
35 WKWebView* BuildWKWebView(CGRect frame, 37 WKWebView* BuildWKWebView(CGRect frame,
36 WKWebViewConfiguration* configuration, 38 WKWebViewConfiguration* configuration,
37 BrowserState* browser_state, 39 BrowserState* browser_state,
38 BOOL use_desktop_user_agent); 40 UserAgentType user_agent_type);
39 41
40 // Creates and returns a new WKWebView for displaying regular web content. 42 // Creates and returns a new WKWebView for displaying regular web content.
41 // The preconditions for the creation of a WKWebView are the same as the 43 // The preconditions for the creation of a WKWebView are the same as the
42 // previous method. 44 // previous method.
43 WKWebView* BuildWKWebView(CGRect frame, 45 WKWebView* BuildWKWebView(CGRect frame,
44 WKWebViewConfiguration* configuration, 46 WKWebViewConfiguration* configuration,
45 BrowserState* browser_state); 47 BrowserState* browser_state);
46 48
47 } // namespace web 49 } // namespace web
48 50
49 #endif // IOS_WEB_WEB_STATE_WEB_VIEW_INTERNAL_CREATION_UTIL_H_ 51 #endif // IOS_WEB_WEB_STATE_WEB_VIEW_INTERNAL_CREATION_UTIL_H_
OLDNEW
« no previous file with comments | « ios/web/web_state/ui/crw_web_controller.mm ('k') | ios/web/web_state/web_view_internal_creation_util.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698