| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #import "ios/web/public/web_controller_factory.h" | 5 #import "ios/web/public/web_controller_factory.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "ios/web/public/browser_state.h" | 9 #include "ios/web/public/browser_state.h" |
| 10 #import "ios/web/web_state/ui/crw_wk_web_view_web_controller.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" | 11 #include "ios/web/web_state/web_state_impl.h" |
| 12 | 12 |
| 13 namespace web { | 13 namespace web { |
| 14 | 14 |
| 15 CRWWebController* CreateWebController(scoped_ptr<WebStateImpl> web_state) { | 15 CRWWebController* CreateWebController(std::unique_ptr<WebStateImpl> web_state) { |
| 16 return | 16 return |
| 17 [[CRWWKWebViewWebController alloc] initWithWebState:std::move(web_state)]; | 17 [[CRWWKWebViewWebController alloc] initWithWebState:std::move(web_state)]; |
| 18 } | 18 } |
| 19 | 19 |
| 20 CRWWebController* CreateWebController(BrowserState* browser_state) { | 20 CRWWebController* CreateWebController(BrowserState* browser_state) { |
| 21 DCHECK(browser_state); | 21 DCHECK(browser_state); |
| 22 scoped_ptr<web::WebStateImpl> web_state(new web::WebStateImpl(browser_state)); | 22 std::unique_ptr<web::WebStateImpl> web_state( |
| 23 new web::WebStateImpl(browser_state)); |
| 23 web_state->GetNavigationManagerImpl().InitializeSession(nil, nil, NO, -1); | 24 web_state->GetNavigationManagerImpl().InitializeSession(nil, nil, NO, -1); |
| 24 return CreateWebController(std::move(web_state)); | 25 return CreateWebController(std::move(web_state)); |
| 25 } | 26 } |
| 26 | 27 |
| 27 } // namespace web | 28 } // namespace web |
| OLD | NEW |