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

Side by Side Diff: ios/web/web_view_creation_util.mm

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
« no previous file with comments | « ios/web/web_state/web_view_internal_creation_util.mm ('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 #import "ios/web/public/web_view_creation_util.h" 5 #import "ios/web/public/web_view_creation_util.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "ios/web/public/user_agent.h"
8 #import "ios/web/web_state/ui/wk_web_view_configuration_provider.h" 9 #import "ios/web/web_state/ui/wk_web_view_configuration_provider.h"
9 #import "ios/web/web_state/web_view_internal_creation_util.h" 10 #import "ios/web/web_state/web_view_internal_creation_util.h"
10 11
11 #if !defined(__has_feature) || !__has_feature(objc_arc) 12 #if !defined(__has_feature) || !__has_feature(objc_arc)
12 #error "This file requires ARC support." 13 #error "This file requires ARC support."
13 #endif 14 #endif
14 15
15 namespace web { 16 namespace web {
16 17
17 WKWebView* BuildWKWebView(CGRect frame, BrowserState* browser_state) { 18 WKWebView* BuildWKWebView(CGRect frame, BrowserState* browser_state) {
18 return BuildWKWebViewWithCustomContextMenu(frame, browser_state, nil); 19 return BuildWKWebViewWithCustomContextMenu(frame, browser_state, nil);
19 } 20 }
20 21
21 WKWebView* BuildWKWebViewWithCustomContextMenu( 22 WKWebView* BuildWKWebViewWithCustomContextMenu(
22 CGRect frame, 23 CGRect frame,
23 BrowserState* browser_state, 24 BrowserState* browser_state,
24 id<CRWContextMenuDelegate> context_menu_delegate) { 25 id<CRWContextMenuDelegate> context_menu_delegate) {
25 DCHECK(browser_state); 26 DCHECK(browser_state);
26 27
27 WKWebViewConfigurationProvider& config_provider = 28 WKWebViewConfigurationProvider& config_provider =
28 WKWebViewConfigurationProvider::FromBrowserState(browser_state); 29 WKWebViewConfigurationProvider::FromBrowserState(browser_state);
29 return BuildWKWebView(frame, config_provider.GetWebViewConfiguration(), 30 return BuildWKWebView(frame, config_provider.GetWebViewConfiguration(),
30 browser_state, NO, context_menu_delegate); 31 browser_state, UserAgentType::MOBILE,
32 context_menu_delegate);
31 } 33 }
32 34
33 } // namespace web 35 } // namespace web
OLDNEW
« no previous file with comments | « ios/web/web_state/web_view_internal_creation_util.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698