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