BINDINGS_POLICY_WEB_UI is not required
This commit is contained in:
parent
846d516584
commit
cc09b9ac7d
2 changed files with 2 additions and 8 deletions
|
@ -61,7 +61,8 @@ class BundledDataSource : public content::URLDataSource {
|
||||||
std::string GetMimeType(const std::string& path) const override {
|
std::string GetMimeType(const std::string& path) const override {
|
||||||
std::string filename = PathWithoutParams(path);
|
std::string filename = PathWithoutParams(path);
|
||||||
std::string mime_type;
|
std::string mime_type;
|
||||||
net::GetMimeTypeFromFile(base::FilePath::FromUTF8Unsafe(filename), &mime_type);
|
net::GetMimeTypeFromFile(
|
||||||
|
base::FilePath::FromUTF8Unsafe(filename), &mime_type);
|
||||||
return mime_type;
|
return mime_type;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -103,10 +104,6 @@ PdfViewerUI::PdfViewerUI(content::BrowserContext* browser_context,
|
||||||
|
|
||||||
PdfViewerUI::~PdfViewerUI() {}
|
PdfViewerUI::~PdfViewerUI() {}
|
||||||
|
|
||||||
void PdfViewerUI::RenderViewCreated(content::RenderViewHost* rvh) {
|
|
||||||
rvh->AllowBindings(content::BINDINGS_POLICY_WEB_UI);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool PdfViewerUI::OnMessageReceived(
|
bool PdfViewerUI::OnMessageReceived(
|
||||||
const IPC::Message& message,
|
const IPC::Message& message,
|
||||||
content::RenderFrameHost* render_frame_host) {
|
content::RenderFrameHost* render_frame_host) {
|
||||||
|
|
|
@ -33,9 +33,6 @@ class PdfViewerUI : public content::WebUIController,
|
||||||
const std::string& src);
|
const std::string& src);
|
||||||
~PdfViewerUI() override;
|
~PdfViewerUI() override;
|
||||||
|
|
||||||
// content::WebUIController implementation.
|
|
||||||
void RenderViewCreated(content::RenderViewHost* rvh) override;
|
|
||||||
|
|
||||||
// content::WebContentsObserver:
|
// content::WebContentsObserver:
|
||||||
bool OnMessageReceived(const IPC::Message& message,
|
bool OnMessageReceived(const IPC::Message& message,
|
||||||
content::RenderFrameHost* render_frame_host) override;
|
content::RenderFrameHost* render_frame_host) override;
|
||||||
|
|
Loading…
Reference in a new issue