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

Side by Side Diff: ios/web/public/web_controller_factory.mm

Issue 1874903003: Reversed WebState <-> CRWWebController ownership. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merged with origin/master Created 4 years, 8 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 unified diff | Download patch
« no previous file with comments | « ios/web/public/web_controller_factory.h ('k') | ios/web/shell/view_controller.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2015 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/public/web_controller_factory.h"
6
7 #include <utility>
8
9 #include "ios/web/public/browser_state.h"
10 #import "ios/web/web_state/ui/crw_wk_web_view_web_controller.h"
11 #include "ios/web/web_state/web_state_impl.h"
12
13 namespace web {
14
15 CRWWebController* CreateWebController(std::unique_ptr<WebStateImpl> web_state) {
16 return
17 [[CRWWKWebViewWebController alloc] initWithWebState:std::move(web_state)];
18 }
19
20 CRWWebController* CreateWebController(BrowserState* browser_state) {
21 DCHECK(browser_state);
22 std::unique_ptr<web::WebStateImpl> web_state(
23 new web::WebStateImpl(browser_state));
24 web_state->GetNavigationManagerImpl().InitializeSession(nil, nil, NO, -1);
25 return CreateWebController(std::move(web_state));
26 }
27
28 } // namespace web
OLDNEW
« no previous file with comments | « ios/web/public/web_controller_factory.h ('k') | ios/web/shell/view_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698