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

Side by Side Diff: ios/web_view/internal/web_view_web_main_delegate.mm

Issue 2791403005: Remove CWV class and move setting User Agent to CWVWebViewConfiguration. (Closed)
Patch Set: Remove cwv.h import from Framework header. 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 #import "ios/web_view/internal/web_view_web_main_delegate.h" 5 #import "ios/web_view/internal/web_view_web_main_delegate.h"
6 6
7 #import "base/mac/bundle_locations.h" 7 #import "base/mac/bundle_locations.h"
8 #include "base/memory/ptr_util.h" 8 #include "base/memory/ptr_util.h"
9 #import "ios/web_view/internal/web_view_web_client.h" 9 #import "ios/web_view/internal/web_view_web_client.h"
10 #import "ios/web_view/public/cwv_web_view.h" 10 #import "ios/web_view/public/cwv_web_view.h"
11 11
12 #if !defined(__has_feature) || !__has_feature(objc_arc) 12 #if !defined(__has_feature) || !__has_feature(objc_arc)
13 #error "This file requires ARC support." 13 #error "This file requires ARC support."
14 #endif 14 #endif
15 15
16 namespace ios_web_view { 16 namespace ios_web_view {
17 17
18 WebViewWebMainDelegate::WebViewWebMainDelegate( 18 WebViewWebMainDelegate::WebViewWebMainDelegate() {}
19 const std::string& user_agent_product)
20 : user_agent_product_(user_agent_product) {}
21 19
22 WebViewWebMainDelegate::~WebViewWebMainDelegate() = default; 20 WebViewWebMainDelegate::~WebViewWebMainDelegate() = default;
23 21
24 void WebViewWebMainDelegate::BasicStartupComplete() { 22 void WebViewWebMainDelegate::BasicStartupComplete() {
25 base::mac::SetOverrideFrameworkBundle( 23 base::mac::SetOverrideFrameworkBundle(
26 [NSBundle bundleForClass:[CWVWebView class]]); 24 [NSBundle bundleForClass:[CWVWebView class]]);
27 web_client_ = base::MakeUnique<WebViewWebClient>(user_agent_product_); 25 web_client_ = base::MakeUnique<WebViewWebClient>();
28 web::SetWebClient(web_client_.get()); 26 web::SetWebClient(web_client_.get());
29 } 27 }
30 28
31 } // namespace ios_web_view 29 } // namespace ios_web_view
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698