electron/brightray/browser/web_ui_controller_factory.h

47 lines
1.5 KiB
C
Raw Normal View History

// Copyright (c) 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE-CHROMIUM file.
#ifndef BRIGHTRAY_BROWSER_WEB_UI_CONTROLLER_FACTORY_H_
#define BRIGHTRAY_BROWSER_WEB_UI_CONTROLLER_FACTORY_H_
2016-03-08 01:14:16 +00:00
#include "base/macros.h"
#include "content/public/browser/web_ui.h"
#include "content/public/browser/web_ui_controller_factory.h"
2015-12-07 11:55:01 +00:00
namespace base {
2018-04-18 01:46:27 +00:00
template <typename T>
struct DefaultSingletonTraits;
2015-12-07 11:55:01 +00:00
}
namespace brightray {
class BrowserContext;
class WebUIControllerFactory : public content::WebUIControllerFactory {
public:
static WebUIControllerFactory* GetInstance();
WebUIControllerFactory();
~WebUIControllerFactory() override;
2018-04-18 01:46:27 +00:00
content::WebUI::TypeID GetWebUIType(content::BrowserContext* browser_context,
const GURL& url) const override;
2015-06-05 04:07:27 +00:00
bool UseWebUIForURL(content::BrowserContext* browser_context,
const GURL& url) const override;
bool UseWebUIBindingsForURL(content::BrowserContext* browser_context,
2014-10-23 03:10:39 +00:00
const GURL& url) const override;
2015-06-05 04:07:27 +00:00
content::WebUIController* CreateWebUIControllerForURL(
content::WebUI* web_ui,
2014-10-23 03:10:39 +00:00
const GURL& url) const override;
private:
2015-12-07 11:55:01 +00:00
friend struct base::DefaultSingletonTraits<WebUIControllerFactory>;
DISALLOW_COPY_AND_ASSIGN(WebUIControllerFactory);
};
} // namespace brightray
#endif // BRIGHTRAY_BROWSER_WEB_UI_CONTROLLER_FACTORY_H_