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

Unified Diff: ios/web_view/internal/criwv.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/BUILD.gn ('k') | ios/web_view/internal/criwv_browser_state.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/web_view/internal/criwv.mm
diff --git a/ios/web_view/internal/criwv.mm b/ios/web_view/internal/criwv.mm
index 0877ffbd87626063890c3332b28cdb617ed3c0ba..7906852d5016a6a813b9df4c6b81b83d1718d86b 100644
--- a/ios/web_view/internal/criwv.mm
+++ b/ios/web_view/internal/criwv.mm
@@ -11,11 +11,11 @@
#include "base/single_thread_task_runner.h"
#include "ios/web/public/app/web_main.h"
#include "ios/web/public/web_thread.h"
-#include "ios/web_view/internal/criwv_browser_state.h"
-#import "ios/web_view/internal/criwv_web_client.h"
#import "ios/web_view/internal/criwv_web_main_delegate.h"
-#import "ios/web_view/internal/criwv_web_view_internal.h"
#import "ios/web_view/public/criwv_delegate.h"
+#import "ios/web_view/public/criwv_web_view.h"
+#import "ios/web_view/public/criwv_web_view_configuration.h"
+#import "ios/web_view/public/criwv_website_data_store.h"
namespace {
CRIWV* g_criwv = nil;
@@ -28,7 +28,6 @@ CRIWV* g_criwv = nil;
}
- (instancetype)initWithDelegate:(id<CRIWVDelegate>)delegate;
-- (ios_web_view::CRIWVBrowserState*)browserState;
@end
@implementation CRIWV
@@ -43,9 +42,12 @@ CRIWV* g_criwv = nil;
}
+ (CRIWVWebView*)webViewWithFrame:(CGRect)frame {
- return
- [[[CRIWVWebView alloc] initWithFrame:frame
- browserState:[g_criwv browserState]] autorelease];
+ CRIWVWebViewConfiguration* configuration =
+ [[CRIWVWebViewConfiguration alloc] init];
+ configuration.websiteDataStore = [CRIWVWebsiteDataStore defaultDataStore];
+
+ return [[[CRIWVWebView alloc] initWithFrame:frame configuration:configuration]
+ autorelease];
}
- (instancetype)initWithDelegate:(id<CRIWVDelegate>)delegate {
@@ -65,10 +67,4 @@ CRIWV* g_criwv = nil;
[super dealloc];
}
-- (ios_web_view::CRIWVBrowserState*)browserState {
- ios_web_view::CRIWVWebClient* client =
- static_cast<ios_web_view::CRIWVWebClient*>(web::GetWebClient());
- return client->browser_state();
-}
-
@end
« no previous file with comments | « ios/web_view/internal/BUILD.gn ('k') | ios/web_view/internal/criwv_browser_state.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698