Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / ios / web / public / web_controller_factory.h
blob48fcf8e56bbca255c6fa309f67570ea7da8e6810
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;
13 namespace web {
15 class BrowserState;
16 class WebStateImpl;
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);
33 } // namespace web
35 #endif // IOS_WEB_PUBLIC_WEB_CONTROLLER_FACTORY_H_