| 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 #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 #include "base/memory/ptr_util.h" | 8 #include "base/memory/ptr_util.h" |
| 8 #import "ios/web_view/internal/web_view_web_client.h" | 9 #import "ios/web_view/internal/web_view_web_client.h" |
| 9 #import "ios/web_view/public/cwv_delegate.h" | 10 #import "ios/web_view/public/cwv_delegate.h" |
| 11 #import "ios/web_view/public/cwv_web_view.h" |
| 10 | 12 |
| 11 #if !defined(__has_feature) || !__has_feature(objc_arc) | 13 #if !defined(__has_feature) || !__has_feature(objc_arc) |
| 12 #error "This file requires ARC support." | 14 #error "This file requires ARC support." |
| 13 #endif | 15 #endif |
| 14 | 16 |
| 15 namespace ios_web_view { | 17 namespace ios_web_view { |
| 16 | 18 |
| 17 WebViewWebMainDelegate::WebViewWebMainDelegate(id<CWVDelegate> delegate) | 19 WebViewWebMainDelegate::WebViewWebMainDelegate(id<CWVDelegate> delegate) |
| 18 : delegate_(delegate) {} | 20 : delegate_(delegate) {} |
| 19 | 21 |
| 20 WebViewWebMainDelegate::~WebViewWebMainDelegate() = default; | 22 WebViewWebMainDelegate::~WebViewWebMainDelegate() = default; |
| 21 | 23 |
| 22 void WebViewWebMainDelegate::BasicStartupComplete() { | 24 void WebViewWebMainDelegate::BasicStartupComplete() { |
| 25 base::mac::SetOverrideFrameworkBundle( |
| 26 [NSBundle bundleForClass:[CWVWebView class]]); |
| 23 web_client_ = base::MakeUnique<WebViewWebClient>(delegate_); | 27 web_client_ = base::MakeUnique<WebViewWebClient>(delegate_); |
| 24 web::SetWebClient(web_client_.get()); | 28 web::SetWebClient(web_client_.get()); |
| 25 } | 29 } |
| 26 | 30 |
| 27 } // namespace ios_web_view | 31 } // namespace ios_web_view |
| OLD | NEW |