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

Side by Side Diff: athena/main/athena_content_client.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 unified diff | Download patch
« no previous file with comments | « athena/main/athena_content_client.h ('k') | athena/main/athena_frame_view.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "athena/main/athena_content_client.h"
6
7 #include "base/files/file_path.h"
8 #include "base/path_service.h"
9 #include "content/public/common/pepper_plugin_info.h"
10 #include "ppapi/shared_impl/ppapi_permissions.h"
11
12 namespace athena {
13
14 AthenaContentClient::AthenaContentClient() {}
15
16 AthenaContentClient::~AthenaContentClient() {}
17
18 void AthenaContentClient::AddPepperPlugins(
19 std::vector<content::PepperPluginInfo>* plugins) {
20 const char kPDFPluginMimeType[] = "application/pdf";
21 const char kPDFPluginExtension[] = "pdf";
22 const char kPDFPluginDescription[] = "Portable Document Format";
23 const char kPDFPluginPrintPreviewMimeType[] =
24 "application/x-google-chrome-print-preview-pdf";
25 const uint32 kPDFPluginPermissions =
26 ppapi::PERMISSION_PRIVATE | ppapi::PERMISSION_DEV;
27 const char kPDFPluginName[] = "Chrome PDF Viewer";
28 const base::FilePath::CharType kPDFPluginFileName[] =
29 FILE_PATH_LITERAL("libpdf.so");
30
31 base::FilePath module;
32 if (!PathService::Get(base::DIR_MODULE, &module))
33 return;
34
35 content::PepperPluginInfo pdf;
36 pdf.path = base::FilePath(module.Append(kPDFPluginFileName));
37 pdf.name = kPDFPluginName;
38 content::WebPluginMimeType pdf_mime_type(
39 kPDFPluginMimeType, kPDFPluginExtension, kPDFPluginDescription);
40 content::WebPluginMimeType print_preview_pdf_mime_type(
41 kPDFPluginPrintPreviewMimeType,
42 kPDFPluginExtension,
43 kPDFPluginDescription);
44 pdf.mime_types.push_back(pdf_mime_type);
45 pdf.mime_types.push_back(print_preview_pdf_mime_type);
46 pdf.permissions = kPDFPluginPermissions;
47 plugins->push_back(pdf);
48
49 ShellContentClient::AddPepperPlugins(plugins);
50 }
51
52 } // namespace athena
OLDNEW
« no previous file with comments | « athena/main/athena_content_client.h ('k') | athena/main/athena_frame_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698