1 // Copyright 2014 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_WEBUI_WEB_UI_IOS_CONTROLLER_FACTORY_REGISTRY_H_
6 #define IOS_WEB_WEBUI_WEB_UI_IOS_CONTROLLER_FACTORY_REGISTRY_H_
8 #include "base/memory/singleton.h"
9 #include "ios/public/provider/web/web_ui_ios_controller_factory.h"
13 // A singleton which holds on to all the registered WebUIIOSControllerFactory
15 class WebUIIOSControllerFactoryRegistry
: public WebUIIOSControllerFactory
{
17 static WebUIIOSControllerFactoryRegistry
* GetInstance();
19 // WebUIIOSControllerFactory implementation. Each method loops through the
20 // same method on all the factories.
21 WebUIIOSController
* CreateWebUIIOSControllerForURL(
23 const GURL
& url
) const override
;
26 friend struct base::DefaultSingletonTraits
<WebUIIOSControllerFactoryRegistry
>;
28 WebUIIOSControllerFactoryRegistry();
29 ~WebUIIOSControllerFactoryRegistry() override
;
31 DISALLOW_COPY_AND_ASSIGN(WebUIIOSControllerFactoryRegistry
);
36 #endif // IOS_WEB_WEBUI_WEB_UI_IOS_CONTROLLER_FACTORY_REGISTRY_H_