browser: implement pdf renderer as webui
This commit is contained in:
parent
48152a813b
commit
fdd574cea5
12 changed files with 322 additions and 1 deletions
40
atom/browser/atom_web_ui_controller_factory.h
Normal file
40
atom/browser/atom_web_ui_controller_factory.h
Normal file
|
@ -0,0 +1,40 @@
|
|||
// Copyright (c) 2017 GitHub, Inc.
|
||||
// Use of this source code is governed by the MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef ATOM_BROWSER_ATOM_WEB_UI_CONTROLLER_FACTORY_H_
|
||||
#define ATOM_BROWSER_ATOM_WEB_UI_CONTROLLER_FACTORY_H_
|
||||
|
||||
#include "base/macros.h"
|
||||
#include "base/memory/singleton.h"
|
||||
#include "content/public/browser/web_ui.h"
|
||||
#include "content/public/browser/web_ui_controller_factory.h"
|
||||
|
||||
namespace atom {
|
||||
|
||||
class AtomWebUIControllerFactory : public content::WebUIControllerFactory {
|
||||
public:
|
||||
static AtomWebUIControllerFactory* GetInstance();
|
||||
|
||||
AtomWebUIControllerFactory();
|
||||
virtual ~AtomWebUIControllerFactory();
|
||||
|
||||
content::WebUI::TypeID GetWebUIType(content::BrowserContext* browser_context,
|
||||
const GURL& url) const override;
|
||||
bool UseWebUIForURL(content::BrowserContext* browser_context,
|
||||
const GURL& url) const override;
|
||||
bool UseWebUIBindingsForURL(content::BrowserContext* browser_context,
|
||||
const GURL& url) const override;
|
||||
content::WebUIController* CreateWebUIControllerForURL(
|
||||
content::WebUI* web_ui,
|
||||
const GURL& url) const override;
|
||||
|
||||
private:
|
||||
friend struct base::DefaultSingletonTraits<AtomWebUIControllerFactory>;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(AtomWebUIControllerFactory);
|
||||
};
|
||||
|
||||
} // namespace atom
|
||||
|
||||
#endif // ATOM_BROWSER_ATOM_WEB_UI_CONTROLLER_FACTORY_H_
|
Loading…
Add table
Add a link
Reference in a new issue