OLD | NEW |
| (Empty) |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #import "ios/web_view/public/criwv_web_view_configuration.h" | |
6 | |
7 #import "ios/web_view/public/cwv_website_data_store.h" | |
8 | |
9 #if !defined(__has_feature) || !__has_feature(objc_arc) | |
10 #error "This file requires ARC support." | |
11 #endif | |
12 | |
13 @interface CRIWVWebViewConfiguration () | |
14 // Initialize configuration with specified data store. | |
15 - (instancetype)initWithDataStore:(CWVWebsiteDataStore*)dataStore; | |
16 @end | |
17 | |
18 @implementation CRIWVWebViewConfiguration | |
19 | |
20 @synthesize websiteDataStore = _websiteDataStore; | |
21 | |
22 - (instancetype)init { | |
23 return [self initWithDataStore:[CWVWebsiteDataStore defaultDataStore]]; | |
24 } | |
25 | |
26 - (instancetype)initWithDataStore:(CWVWebsiteDataStore*)dataStore { | |
27 self = [super init]; | |
28 if (self) { | |
29 _websiteDataStore = dataStore; | |
30 } | |
31 return self; | |
32 } | |
33 | |
34 // NSCopying | |
35 | |
36 - (id)copyWithZone:(NSZone*)zone { | |
37 return | |
38 [[[self class] allocWithZone:zone] initWithDataStore:_websiteDataStore]; | |
39 } | |
40 | |
41 @end | |
OLD | NEW |