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

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

Issue 2679003002: Initialize CRIWVWebView with Configuration object instead of browserState. (Closed)
Patch Set: 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
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..3a16dd1f60fcf37fd50db207a64143d5bfb182ab 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_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 {
Eugene But (OOO till 7-30) 2017/02/06 23:31:56 I assume we going to remove this method. Right?
michaeldo 2017/02/06 23:53:49 Yes, we will, I just didn't want this CL to get to
- 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

Powered by Google App Engine
This is Rietveld 408576698