#ifndef CHROME_BROWSER_UI_WEBUI_ABOUT_UI_H_
#define CHROME_BROWSER_UI_WEBUI_ABOUT_UI_H_
#include <string>
#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "content/public/browser/url_data_source.h"
#include "content/public/browser/web_ui_controller.h"
class Profile;
class AboutUIHTMLSource : public content::URLDataSource {
public:
AboutUIHTMLSource(const std::string& source_name, Profile* profile);
virtual std::string GetSource() const OVERRIDE;
virtual void StartDataRequest(
const std::string& path,
int render_process_id,
int render_frame_id,
const content::URLDataSource::GotDataCallback& callback) OVERRIDE;
virtual std::string GetMimeType(const std::string& path) const OVERRIDE;
virtual bool ShouldAddContentSecurityPolicy() const OVERRIDE;
virtual bool ShouldDenyXFrameOptions() const OVERRIDE;
void FinishDataRequest(
const std::string& html,
const content::URLDataSource::GotDataCallback& callback);
Profile* profile() { return profile_; }
private:
virtual ~AboutUIHTMLSource();
std::string source_name_;
Profile* profile_;
DISALLOW_COPY_AND_ASSIGN(AboutUIHTMLSource);
};
class AboutUI : public content::WebUIController {
public:
explicit AboutUI(content::WebUI* web_ui, const std::string& host);
virtual ~AboutUI() {}
private:
DISALLOW_COPY_AND_ASSIGN(AboutUI);
};
namespace about_ui {
void AppendHeader(std::string* output, int refresh,
const std::string& unescaped_title);
void AppendBody(std::string *output);
void AppendFooter(std::string *output);
}
#endif