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

Unified Diff: ios/web_view/internal/criwv_web_view.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_web_view.mm
diff --git a/ios/web_view/internal/criwv_web_view.mm b/ios/web_view/internal/criwv_web_view.mm
index 5982379984dae4a7aec04d1c1017e7a4ee245745..0a07e6540d208b5ff70ecd644fe6e2a68fd9690d 100644
--- a/ios/web_view/internal/criwv_web_view.mm
+++ b/ios/web_view/internal/criwv_web_view.mm
@@ -17,7 +17,9 @@
#import "ios/web/public/web_state/web_state_delegate_bridge.h"
#import "ios/web/public/web_state/web_state_observer_bridge.h"
#include "ios/web_view/internal/criwv_browser_state.h"
+#import "ios/web_view/internal/criwv_website_data_store_internal.h"
Eugene But (OOO till 7-30) 2017/02/06 23:31:56 nit: Import "ios/web_view/internal/criwv_website_d
michaeldo 2017/02/06 23:53:49 Done.
#import "ios/web_view/internal/translate/criwv_translate_client.h"
+#import "ios/web_view/public/criwv_web_view_configuration.h"
#import "ios/web_view/public/criwv_web_view_delegate.h"
#import "net/base/mac/url_conversions.h"
#include "ui/base/page_transition_types.h"
@@ -25,7 +27,7 @@
@interface CRIWVWebView ()<CRWWebStateDelegate, CRWWebStateObserver> {
id<CRIWVWebViewDelegate> _delegate;
- ios_web_view::CRIWVBrowserState* _browserState;
+ CRIWVWebViewConfiguration* _configuration;
std::unique_ptr<web::WebState> _webState;
std::unique_ptr<web::WebStateDelegateBridge> _webStateDelegate;
std::unique_ptr<web::WebStateObserverBridge> _webStateObserver;
@@ -40,12 +42,13 @@
@synthesize loadProgress = _loadProgress;
- (instancetype)initWithFrame:(CGRect)frame
- browserState:(ios_web_view::CRIWVBrowserState*)browserState {
+ configuration:(CRIWVWebViewConfiguration*)configuration {
self = [super initWithFrame:frame];
if (self) {
- _browserState = browserState;
+ _configuration = configuration;
Eugene But (OOO till 7-30) 2017/02/06 23:31:56 [configuration copy] It's ok to make the change i
michaeldo 2017/02/06 23:53:49 Done. Needed to upload new patch anyway.
- web::WebState::CreateParams webStateCreateParams(_browserState);
+ web::WebState::CreateParams webStateCreateParams(
+ [configuration.websiteDataStore browserState]);
_webState = web::WebState::Create(webStateCreateParams);
_webState->SetWebUsageEnabled(true);

Powered by Google App Engine
This is Rietveld 408576698