| 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 #ifndef IOS_WEB_PUBLIC_WEB_CONTROLLER_FACTORY_H_ | 5 #ifndef IOS_WEB_PUBLIC_WEB_CONTROLLER_FACTORY_H_ |
| 6 #define IOS_WEB_PUBLIC_WEB_CONTROLLER_FACTORY_H_ | 6 #define IOS_WEB_PUBLIC_WEB_CONTROLLER_FACTORY_H_ |
| 7 | 7 |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include <memory> |
| 9 | 9 |
| 10 @class CRWWebController; | 10 @class CRWWebController; |
| 11 | 11 |
| 12 namespace web { | 12 namespace web { |
| 13 | 13 |
| 14 class BrowserState; | 14 class BrowserState; |
| 15 class WebStateImpl; | 15 class WebStateImpl; |
| 16 | 16 |
| 17 // Returns a new instance of CRWWebViewController. | 17 // Returns a new instance of CRWWebViewController. |
| 18 // Note: Callers are responsible for releasing the returned web controller. | 18 // Note: Callers are responsible for releasing the returned web controller. |
| 19 CRWWebController* CreateWebController(scoped_ptr<WebStateImpl> web_state); | 19 CRWWebController* CreateWebController(std::unique_ptr<WebStateImpl> web_state); |
| 20 | 20 |
| 21 // Returns a new instance of CRWWebViewController. | 21 // Returns a new instance of CRWWebViewController. |
| 22 // Temporary factory method for use in components that require a web controller. | 22 // Temporary factory method for use in components that require a web controller. |
| 23 // By requiring only the BrowserState, this eliminates the dependency on | 23 // By requiring only the BrowserState, this eliminates the dependency on |
| 24 // WebStateImpl from components. | 24 // WebStateImpl from components. |
| 25 // Note: Callers are responsible for releasing the returned web controller. | 25 // Note: Callers are responsible for releasing the returned web controller. |
| 26 // TODO(crbug.com/546221): Move factory method to WebState once the ownership of | 26 // TODO(crbug.com/546221): Move factory method to WebState once the ownership of |
| 27 // WebState and CRWWebController is reversed. | 27 // WebState and CRWWebController is reversed. |
| 28 CRWWebController* CreateWebController(BrowserState* browser_state); | 28 CRWWebController* CreateWebController(BrowserState* browser_state); |
| 29 | 29 |
| 30 } // namespace web | 30 } // namespace web |
| 31 | 31 |
| 32 #endif // IOS_WEB_PUBLIC_WEB_CONTROLLER_FACTORY_H_ | 32 #endif // IOS_WEB_PUBLIC_WEB_CONTROLLER_FACTORY_H_ |
| OLD | NEW |