Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2485)

Unified Diff: athena/main/athena_renderer_pdf_helper.cc

Issue 863033002: Delete athena/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « athena/main/athena_renderer_pdf_helper.h ('k') | athena/main/athena_views_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: athena/main/athena_renderer_pdf_helper.cc
diff --git a/athena/main/athena_renderer_pdf_helper.cc b/athena/main/athena_renderer_pdf_helper.cc
deleted file mode 100644
index 7ccf563bab7d6435247a43e10fd90b44cd0cc49e..0000000000000000000000000000000000000000
--- a/athena/main/athena_renderer_pdf_helper.cc
+++ /dev/null
@@ -1,72 +0,0 @@
-// Copyright 2014 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 file.
-
-#include "athena/main/athena_renderer_pdf_helper.h"
-
-#include "components/pdf/renderer/pepper_pdf_host.h"
-#include "content/public/renderer/renderer_ppapi_host.h"
-#include "ppapi/host/host_factory.h"
-#include "ppapi/host/ppapi_host.h"
-#include "ppapi/host/resource_host.h"
-#include "ppapi/proxy/ppapi_messages.h"
-
-namespace athena {
-
-namespace {
-
-class PDFRendererHostFactory : public ppapi::host::HostFactory {
- public:
- explicit PDFRendererHostFactory(content::RendererPpapiHost* host)
- : host_(host) {}
- ~PDFRendererHostFactory() override {}
-
- private:
- // ppapi::host::HostFactory:
- virtual scoped_ptr<ppapi::host::ResourceHost> CreateResourceHost(
- ppapi::host::PpapiHost* host,
- PP_Resource resource,
- PP_Instance instance,
- const IPC::Message& message) override {
- DCHECK_EQ(host_->GetPpapiHost(), host);
- // Make sure the plugin is giving us a valid instance for this resource.
- if (!host_->IsValidInstance(instance))
- return scoped_ptr<ppapi::host::ResourceHost>();
-
- if (host_->GetPpapiHost()->permissions().HasPermission(
- ppapi::PERMISSION_PRIVATE)) {
- switch (message.type()) {
- case PpapiHostMsg_PDF_Create::ID:
- return scoped_ptr<ppapi::host::ResourceHost>(
- new pdf::PepperPDFHost(host_, instance, resource));
-
- case PpapiHostMsg_FlashFontFile_Create::ID:
- return scoped_ptr<ppapi::host::ResourceHost>(
- new ppapi::host::ResourceHost(host_->GetPpapiHost(), instance,
- resource));
- }
- }
-
- return scoped_ptr<ppapi::host::ResourceHost>();
- }
-
- // Not owned by this object.
- content::RendererPpapiHost* host_;
-
- DISALLOW_COPY_AND_ASSIGN(PDFRendererHostFactory);
-};
-
-} // namespace
-
-AthenaRendererPDFHelper::AthenaRendererPDFHelper(content::RenderFrame* frame)
- : content::RenderFrameObserver(frame) {}
-
-AthenaRendererPDFHelper::~AthenaRendererPDFHelper() {}
-
-void AthenaRendererPDFHelper::DidCreatePepperPlugin(
- content::RendererPpapiHost* host) {
- host->GetPpapiHost()->AddHostFactoryFilter(
- scoped_ptr<ppapi::host::HostFactory>(new PDFRendererHostFactory(host)));
-}
-
-} // namespace athena
« no previous file with comments | « athena/main/athena_renderer_pdf_helper.h ('k') | athena/main/athena_views_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698