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

Side by Side Diff: content/renderer/pepper/pepper_plugin_instance_impl.cc

Issue 16206002: Add more support for FreeBSD (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 7 years, 3 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/renderer/pepper/pepper_plugin_instance_impl.h" 5 #include "content/renderer/pepper/pepper_plugin_instance_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback_helpers.h" 8 #include "base/callback_helpers.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 1720 matching lines...) Expand 10 before | Expand all | Expand 10 after
1731 if (!pdf_module) 1731 if (!pdf_module)
1732 return false; 1732 return false;
1733 RenderPDFPageToDCProc render_proc = 1733 RenderPDFPageToDCProc render_proc =
1734 reinterpret_cast<RenderPDFPageToDCProc>( 1734 reinterpret_cast<RenderPDFPageToDCProc>(
1735 GetProcAddress(pdf_module, "RenderPDFPageToDC")); 1735 GetProcAddress(pdf_module, "RenderPDFPageToDC"));
1736 if (!render_proc) 1736 if (!render_proc)
1737 return false; 1737 return false;
1738 #endif // defined(OS_WIN) 1738 #endif // defined(OS_WIN)
1739 1739
1740 bool ret = false; 1740 bool ret = false;
1741 #if defined(OS_LINUX) || defined(OS_MACOSX) 1741 #if defined(OS_POSIX) && !defined(OS_ANDROID)
1742 // On Linux we just set the final bits in the native metafile 1742 // On Linux we just set the final bits in the native metafile
1743 // (NativeMetafile and PreviewMetafile must have compatible formats, 1743 // (NativeMetafile and PreviewMetafile must have compatible formats,
1744 // i.e. both PDF for this to work). 1744 // i.e. both PDF for this to work).
1745 printing::Metafile* metafile = 1745 printing::Metafile* metafile =
1746 printing::MetafileSkiaWrapper::GetMetafileFromCanvas(*canvas); 1746 printing::MetafileSkiaWrapper::GetMetafileFromCanvas(*canvas);
1747 DCHECK(metafile != NULL); 1747 DCHECK(metafile != NULL);
1748 if (metafile) 1748 if (metafile)
1749 ret = metafile->InitFromData(mapper.data(), mapper.size()); 1749 ret = metafile->InitFromData(mapper.data(), mapper.size());
1750 #elif defined(OS_WIN) 1750 #elif defined(OS_WIN)
1751 printing::Metafile* metafile = 1751 printing::Metafile* metafile =
(...skipping 1222 matching lines...) Expand 10 before | Expand all | Expand 10 after
2974 // Running out-of-process. Initiate an IPC call to notify the plugin 2974 // Running out-of-process. Initiate an IPC call to notify the plugin
2975 // process. 2975 // process.
2976 ppapi::proxy::HostDispatcher* dispatcher = 2976 ppapi::proxy::HostDispatcher* dispatcher =
2977 ppapi::proxy::HostDispatcher::GetForInstance(pp_instance()); 2977 ppapi::proxy::HostDispatcher::GetForInstance(pp_instance());
2978 dispatcher->Send(new PpapiMsg_PPPInstance_HandleDocumentLoad( 2978 dispatcher->Send(new PpapiMsg_PPPInstance_HandleDocumentLoad(
2979 ppapi::API_ID_PPP_INSTANCE, pp_instance(), pending_host_id, data)); 2979 ppapi::API_ID_PPP_INSTANCE, pp_instance(), pending_host_id, data));
2980 } 2980 }
2981 } 2981 }
2982 2982
2983 } // namespace content 2983 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698