diff options
author | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-10 22:49:56 +0000 |
---|---|---|
committer | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-10 22:49:56 +0000 |
commit | c20436859b9eeca254bdea4dda52e29ba34fc612 (patch) | |
tree | c101ab72721c57fed07425a27490755732844bb3 /chrome/renderer/chrome_ppapi_interfaces.cc | |
parent | 40a3a6590c76d93cd13d16440b1d84d956b71d58 (diff) | |
download | chromium_src-c20436859b9eeca254bdea4dda52e29ba34fc612.zip chromium_src-c20436859b9eeca254bdea4dda52e29ba34fc612.tar.gz chromium_src-c20436859b9eeca254bdea4dda52e29ba34fc612.tar.bz2 |
Moving some of the webkit_glue functions from chrome\common\common_glue and chrome\renderer\chrome_renderer_glue.cc
to content\renderer. This helps reduce some of the implicit dependencies of content on chrome and will help in building
it as a dll.
There is just one function GetProductVersion remaining in chrome_renderer_glue. This function is used to build
the user agent string in the embedder. This functionality will be moved to the ContentRendererClient object in a
subsequent CL.
Moved the PPAPI PDF plugin implementation to chrome renderer. This interface is returned by the PPAPI factory
which is registered by the renderer during startup.
BUG=82454
Review URL: http://codereview.chromium.org/6995119
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@88742 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/chrome_ppapi_interfaces.cc')
-rw-r--r-- | chrome/renderer/chrome_ppapi_interfaces.cc | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/chrome/renderer/chrome_ppapi_interfaces.cc b/chrome/renderer/chrome_ppapi_interfaces.cc index e57794c..b3e83d5 100644 --- a/chrome/renderer/chrome_ppapi_interfaces.cc +++ b/chrome/renderer/chrome_ppapi_interfaces.cc @@ -8,8 +8,10 @@ #include "base/rand_util_c.h" #include "base/utf_string_conversions.h" #include "chrome/common/render_messages.h" +#include "chrome/renderer/chrome_ppb_pdf_impl.h" #include "content/renderer/render_thread.h" #include "ppapi/c/private/ppb_nacl_private.h" +#include "ppapi/c/private/ppb_pdf.h" #include "webkit/plugins/ppapi/ppapi_interface_factory.h" #if !defined(DISABLE_NACL) @@ -60,9 +62,20 @@ const PPB_NaCl_Private ppb_nacl = { &UrandomFD, }; +class PPB_NaCl_Impl { + public: + // Returns a pointer to the interface implementing PPB_NaCl_Private that is + // exposed to the plugin. + static const PPB_NaCl_Private* GetInterface() { + return &ppb_nacl; + } +}; + const void* ChromePPAPIInterfaceFactory(const std::string& interface_name) { if (interface_name == PPB_NACL_PRIVATE_INTERFACE) - return &ppb_nacl; + return chrome::PPB_NaCl_Impl::GetInterface(); + if (interface_name == PPB_PDF_INTERFACE) + return chrome::PPB_PDF_Impl::GetInterface(); return NULL; } |