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

Unified Diff: ios/web_view/internal/criwv_web_view_configuration.mm

Issue 2679003002: Initialize CRIWVWebView with Configuration object instead of browserState. (Closed)
Patch Set: Rebase. Respond to comments. Fix duplicate unique_ptr. Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ios/web_view/internal/criwv_web_view.mm ('k') | ios/web_view/internal/criwv_web_view_internal.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/web_view/internal/criwv_web_view_configuration.mm
diff --git a/ios/web_view/internal/criwv_web_view_configuration.mm b/ios/web_view/internal/criwv_web_view_configuration.mm
new file mode 100644
index 0000000000000000000000000000000000000000..8e9ee2105427ccebbe4f57f0dd5047c8c4d10340
--- /dev/null
+++ b/ios/web_view/internal/criwv_web_view_configuration.mm
@@ -0,0 +1,41 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#import "ios/web_view/public/criwv_web_view_configuration.h"
+
+#import "ios/web_view/public/criwv_website_data_store.h"
+
+#if !defined(__has_feature) || !__has_feature(objc_arc)
+#error "This file requires ARC support."
+#endif
+
+@interface CRIWVWebViewConfiguration ()
+// Initialize configuration with specified data store.
+- (instancetype)initWithDataStore:(CRIWVWebsiteDataStore*)dataStore;
+@end
+
+@implementation CRIWVWebViewConfiguration
+
+@synthesize websiteDataStore = _websiteDataStore;
+
+- (instancetype)init {
+ return [self initWithDataStore:[CRIWVWebsiteDataStore defaultDataStore]];
+}
+
+- (instancetype)initWithDataStore:(CRIWVWebsiteDataStore*)dataStore {
+ self = [super init];
+ if (self) {
+ _websiteDataStore = dataStore;
+ }
+ return self;
+}
+
+// NSCopying
+
+- (id)copyWithZone:(NSZone*)zone {
+ return
+ [[[self class] allocWithZone:zone] initWithDataStore:_websiteDataStore];
+}
+
+@end
« no previous file with comments | « ios/web_view/internal/criwv_web_view.mm ('k') | ios/web_view/internal/criwv_web_view_internal.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698