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

Unified Diff: chrome/renderer/pepper/ppb_pdf_impl.cc

Issue 16206002: Add more support for FreeBSD (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use os_posix and exclude other platforms as needed Created 7 years, 4 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
Index: chrome/renderer/pepper/ppb_pdf_impl.cc
diff --git a/chrome/renderer/pepper/ppb_pdf_impl.cc b/chrome/renderer/pepper/ppb_pdf_impl.cc
index 85e92e1ccb9d9d214f6e2afe7864cc0edf08c295..57ad3e186bf11d8e0481640e8a04f209da43e4e3 100644
--- a/chrome/renderer/pepper/ppb_pdf_impl.cc
+++ b/chrome/renderer/pepper/ppb_pdf_impl.cc
@@ -44,7 +44,8 @@ using content::RenderThread;
namespace {
-#if defined(OS_LINUX) || defined(OS_OPENBSD)
+#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) && \
+ !defined(OS_NACL)
class PrivateFontFile : public ppapi::Resource {
public:
PrivateFontFile(PP_Instance instance, int fd)
@@ -192,7 +193,8 @@ PP_Resource GetFontFileWithFallback(
PP_Instance instance_id,
const PP_BrowserFont_Trusted_Description* description,
PP_PrivateFontCharset charset) {
-#if defined(OS_LINUX) || defined(OS_OPENBSD)
+#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) && \
+ !defined(OS_NACL)
// Validate the instance before using it below.
if (!content::PepperPluginInstance::Get(instance_id))
return 0;
@@ -224,7 +226,8 @@ bool GetFontTableForPrivateFontFile(PP_Resource font_file,
uint32_t table,
void* output,
uint32_t* output_length) {
-#if defined(OS_LINUX) || defined(OS_OPENBSD)
+#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) && \
+ !defined(OS_NACL)
ppapi::Resource* resource =
PpapiGlobals::Get()->GetResourceTracker()->GetResource(font_file);
if (!resource)

Powered by Google App Engine
This is Rietveld 408576698