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.
5 #ifndef IOS_WEB_PUBLIC_WEB_CONTROLLER_FACTORY_H_
6 #define IOS_WEB_PUBLIC_WEB_CONTROLLER_FACTORY_H_
8 #include "base/memory/scoped_ptr.h"
9 #include "ios/web/public/web_view_type.h"
11 @
class CRWWebController
;
18 // Returns a new instance of CRWWebViewController.
19 // Note: Callers are responsible for releasing the returned web controller.
20 CRWWebController
* CreateWebController(WebViewType web_view_type
,
21 scoped_ptr
<WebStateImpl
> web_state
);
23 // Returns a new instance of CRWWebViewController.
24 // Temporary factory method for use in components that require a web controller.
25 // By requiring only the BrowserState, this eliminates the dependency on
26 // WebStateImpl from components.
27 // Note: Callers are responsible for releasing the returned web controller.
28 // TODO(kkhorimoto): Move factory method to WebState once the ownership of
29 // WebState and CRWWebController is reversed.
30 CRWWebController
* CreateWebController(WebViewType web_view_type
,
31 BrowserState
* browser_state
);
35 #endif // IOS_WEB_PUBLIC_WEB_CONTROLLER_FACTORY_H_