2013-05-14 06:45:34 +00:00
|
|
|
// 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_
|
|
|
|
|
|
|
|
#include "base/basictypes.h"
|
|
|
|
#include "content/public/browser/web_ui.h"
|
|
|
|
#include "content/public/browser/web_ui_controller_factory.h"
|
|
|
|
|
2015-08-27 19:54:05 +00:00
|
|
|
template <typename T> struct DefaultSingletonTraits;
|
|
|
|
|
2013-05-14 06:45:34 +00:00
|
|
|
namespace brightray {
|
|
|
|
|
|
|
|
class BrowserContext;
|
|
|
|
|
|
|
|
class WebUIControllerFactory : public content::WebUIControllerFactory {
|
|
|
|
public:
|
2015-08-27 19:54:05 +00:00
|
|
|
static WebUIControllerFactory* GetInstance();
|
|
|
|
|
|
|
|
WebUIControllerFactory();
|
2013-05-14 06:45:34 +00:00
|
|
|
virtual ~WebUIControllerFactory();
|
|
|
|
|
2015-06-05 04:07:27 +00:00
|
|
|
content::WebUI::TypeID GetWebUIType(
|
2014-10-23 03:10:39 +00:00
|
|
|
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(
|
2013-05-14 06:45:34 +00:00
|
|
|
content::WebUI* web_ui,
|
2014-10-23 03:10:39 +00:00
|
|
|
const GURL& url) const override;
|
2013-05-14 06:45:34 +00:00
|
|
|
|
|
|
|
private:
|
2015-08-27 19:54:05 +00:00
|
|
|
friend struct DefaultSingletonTraits<WebUIControllerFactory>;
|
2013-05-14 06:45:34 +00:00
|
|
|
|
|
|
|
DISALLOW_COPY_AND_ASSIGN(WebUIControllerFactory);
|
|
|
|
};
|
|
|
|
|
2013-11-17 23:20:17 +00:00
|
|
|
} // namespace brightray
|
2013-05-14 06:45:34 +00:00
|
|
|
|
|
|
|
#endif
|