summaryrefslogtreecommitdiffstats
path: root/webkit/plugins/ppapi
Commit message (Collapse)AuthorAgeFilesLines
* Add proper support for copy-constructed pp::Buffer_Dev's.fischman@chromium.org2011-06-142-4/+6
| | | | | | | | | | | | This requires refcounting Map() to make sure that Unmap() is called once per underlying SharedMemory. BUG=85629 TEST=trybots, ui_tests:*PPAPI.Buffer Review URL: http://codereview.chromium.org/7146007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89044 0039d316-1c4b-4281-b951-d872f2087c98
* Moving some of the webkit_glue functions from chrome\common\common_glue and ↵ananta@chromium.org2011-06-104-378/+1
| | | | | | | | | | | | | | | | | | | 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
* Implement AssignGLESBuffers for VideoDecode PPAPIvrk@google.com2011-06-105-15/+42
| | | | | | | | | | | | | | Fills in implementation for AssignGLESBuffers where it was missing. Also updates OmxVideoDecodeAccelerator to reflect the changes. BUG=NONE TEST=NONE Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=88698 Review URL: http://codereview.chromium.org/6965010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@88733 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 88698 - Implement AssignGLESBuffers for VideoDecode PPAPIdavemoore@chromium.org2011-06-105-42/+15
| | | | | | | | | | | | | | | Fills in implementation for AssignGLESBuffers where it was missing. Also updates OmxVideoDecodeAccelerator to reflect the changes. BUG=NONE TEST=NONE Review URL: http://codereview.chromium.org/6965010 TBR=vrk@google.com Review URL: http://codereview.chromium.org/7044115 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@88702 0039d316-1c4b-4281-b951-d872f2087c98
* Implement AssignGLESBuffers for VideoDecode PPAPIvrk@google.com2011-06-105-15/+42
| | | | | | | | | | | | Fills in implementation for AssignGLESBuffers where it was missing. Also updates OmxVideoDecodeAccelerator to reflect the changes. BUG=NONE TEST=NONE Review URL: http://codereview.chromium.org/6965010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@88698 0039d316-1c4b-4281-b951-d872f2087c98
* Implement out-of-process proxy for PPB_Buffer_Dev.fischman@chromium.org2011-06-103-3/+29
| | | | | | | | | BUG=85427,85441 TEST=./ninja/ui_tests --gtest_filter=*PPAPITest.Buffer Review URL: http://codereview.chromium.org/7108051 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@88630 0039d316-1c4b-4281-b951-d872f2087c98
* roll clang 131935:132017thakis@chromium.org2011-06-082-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | clang recently added a warning that warns when invoking 'delete' on a polymorphic non-final class without a virtual destructor. This finds real bugs – see the bug referenced below for a few examples. However, one common pattern where it fires is this case: class SomeInterface { public: virtual void interfaceMethod() {} // or = 0; protected: ~SomeInterface() {} } class WorkerClass : public SomeInterface { public: // many non-virtual functions, but also: virtual void interfaceMethod() override { /* do actual work */ } }; void f() { scoped_ptr<WorkerClass> c(new WorkerClass); // simplified example } (See the 2nd half of http://www.gotw.ca/publications/mill18.htm for an explanation of this pattern.) It is arguably correct to fire the warning here, since someone might make a subclass of WorkerClass and replace |new WorkerClass| with |new WorkerClassSubclass|. This would be broken since WorkerClass doesn't have a virtual destructor. The solution that the clang folks recommend is to mark WorkerClass as |final| (a c++0x keyword that clang supports as an extension in normal c++ mode – like override). But chrome's base/OWNERS deemed that as too complicated and we decided to make virtual the destructors of leaf classes that implement these interfaces and that are deleted dynamically. All of the changes in this CL are to shut up the warning, not because of real problems (I fixed these in separate CLs). (For the gtk files, this is necessary because the CHROMEGTK_CALLBACK_ macros add virtual functions.) BUG=84424 TEST=none Review URL: http://codereview.chromium.org/7087028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@88270 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 87919 - Revert 87905 (broke PPAPITest.Scrollbar on win) - PPAPI: Fix ↵polina@google.com2011-06-064-49/+69
| | | | | | | | | | | | | | | | | | | | interface functions that take PP_CompletionCallbacks, but don't return codes from pp_errors.h 87905 - Review URL: http://codereview.chromium.org/6975053 87919 - Review URL: http://codereview.chromium.org/7058061 BUG=85010 TEST=none Review URL: http://codereview.chromium.org/6975053 Review URL: http://codereview.chromium.org/7058061 TBR=dhollowa@chromium.org Review URL: http://codereview.chromium.org/7112040 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@88055 0039d316-1c4b-4281-b951-d872f2087c98
* Reduce one of the implicit dependencies of src\content on chrome\renderer by ↵ananta@chromium.org2011-06-056-80/+7
| | | | | | | | | | | | | | | | | | moving the custom nacl ppapi interface PPB_NACL_PRIVATE_INTERFACE to chrome\renderer. This interface is returned via a factory which is registered in the renderer process, when the render thread is created. This CL is intended to eventually help build src\content as an independent dll. I also changed the ChromeContentRendererClient and ChromeContentPluginClient instances to be lazy instances to fix some asserts i was seeing while running browser_tests. BUG=82454 Review URL: http://codereview.chromium.org/7066069 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87943 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 87905 (broke PPAPITest.Scrollbar on win) - PPAPI: Fix interface ↵thakis@chromium.org2011-06-044-69/+49
| | | | | | | | | | | | | | | functions that take PP_CompletionCallbacks, but don't return codes from pp_errors.h BUG=none TEST=compile + manually run ppapi_tests::VideoDecoder Review URL: http://codereview.chromium.org/6975053 TBR=polina@google.com Review URL: http://codereview.chromium.org/7058061 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87919 0039d316-1c4b-4281-b951-d872f2087c98
* PPAPI: Fix interface functions that take PP_CompletionCallbacks, but don'tpolina@google.com2011-06-044-49/+69
| | | | | | | | | | return codes from pp_errors.h BUG=none TEST=compile + manually run ppapi_tests::VideoDecoder Review URL: http://codereview.chromium.org/6975053 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87905 0039d316-1c4b-4281-b951-d872f2087c98
* make command buffer work in DRTgman@chromium.org2011-06-031-1/+1
| | | | | | | | | | | | | | | | | | | | | Note several tests get different results than the non-command buffer path. I'm not sure if that's bugs in this impl, bugs in the command buffer or bugs else where but that's kind of the point. This CL is supposed to help find those bugs. Is there something I should do to mark them to be fixed before checking this in? Should I leave webkit_support.cc out of this CL? TEST=ran layout tests BUG=84157 R=jamesr@chromium.org Review URL: http://codereview.chromium.org/7085002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87879 0039d316-1c4b-4281-b951-d872f2087c98
* Implementation for Pepper C++ Video Decoder API (wrapper on top of C API).vmr@chromium.org2011-06-032-15/+16
| | | | | | | | | | BUG= TEST= Review URL: http://codereview.chromium.org/7085030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87831 0039d316-1c4b-4281-b951-d872f2087c98
* Fix comment in pdf interface.elijahtaylor@google.com2011-06-031-2/+2
| | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/7088024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87734 0039d316-1c4b-4281-b951-d872f2087c98
* Fix resource icons not writing to shared memory correctly.elijahtaylor@google.com2011-06-021-5/+3
| | | | | | | | BUG=none TEST=manual Review URL: http://codereview.chromium.org/6975063 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87634 0039d316-1c4b-4281-b951-d872f2087c98
* Don't allow Pepper URL requests to have Javascript URLs. Modify ↵bbudge@google.com2011-06-022-0/+10
| | | | | | | | PPB_URLRequestInfo_Impl::SetStringProperty to reject Javascript URLs. Review URL: http://codereview.chromium.org/7006004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87629 0039d316-1c4b-4281-b951-d872f2087c98
* Convert more interfaces to the new thunk system. This goes up to and includingbrettw@chromium.org2011-06-0135-670/+493
| | | | | | | | | | | | | | | the ones starting with "F". Since this adds a lot more interfaces, I added the macro stuff we used for the old system to generate the various template specializations. This involded a lot of renaming since the As* needs to match the name (I was previously leaving off the "PPB_" part). I did other misc cleanup to the infrastructure. Review URL: http://codereview.chromium.org/7082036 Reland 87415 Review URL: http://codereview.chromium.org/7105013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87444 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 87415 - Convert more interfaces to the new thunk system. This goes up ↵thestig@chromium.org2011-06-0135-489/+670
| | | | | | | | | | | | | | | | | to and including the ones starting with "F". Since this adds a lot more interfaces, I added the macro stuff we used for the old system to generate the various template specializations. This involded a lot of renaming since the As* needs to match the name (I was previously leaving off the "PPB_" part). I did other misc cleanup to the infrastructure. Review URL: http://codereview.chromium.org/7082036 TBR=brettw@chromium.org Review URL: http://codereview.chromium.org/7006022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87438 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 87419 - Add some missing virtual keywords to fix the clang build.thestig@chromium.org2011-06-012-2/+2
| | | | | | | | | | | TEST+it compiles BUG=none Review URL: http://codereview.chromium.org/7027021 TBR=brettw@chromium.org Review URL: http://codereview.chromium.org/7105011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87436 0039d316-1c4b-4281-b951-d872f2087c98
* Relanding this as the previous iteration broke the chrome os build.ananta@chromium.org2011-06-014-0/+172
| | | | | | | | | | | | | | | | Added a facility in PPAPI to register interface factories which can watch GetInterface calls and return custom interfaces. Added a basic unit test to validate that the custom factory does get called. This would eventually be used to register custom interfaces for plugins like NACL which rely on chrome\renderer provided functionality via the webkit_glue namespace. This will help in eventually building src\content as a dll. BUG=82454 TEST=covered by test shell tests. TBR=apatrick Review URL: http://codereview.chromium.org/7104015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87426 0039d316-1c4b-4281-b951-d872f2087c98
* Add some missing virtual keywords to fix the clang build.brettw@chromium.org2011-06-012-2/+2
| | | | | | | | TEST+it compiles BUG=none Review URL: http://codereview.chromium.org/7027021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87419 0039d316-1c4b-4281-b951-d872f2087c98
* Convert more interfaces to the new thunk system. This goes up to and includingbrettw@chromium.org2011-06-0135-670/+489
| | | | | | | | | | | | the ones starting with "F". Since this adds a lot more interfaces, I added the macro stuff we used for the old system to generate the various template specializations. This involded a lot of renaming since the As* needs to match the name (I was previously leaving off the "PPB_" part). I did other misc cleanup to the infrastructure. Review URL: http://codereview.chromium.org/7082036 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87415 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 87396 - Added a facility in PPAPI to register interface factories ↵apatrick@chromium.org2011-06-014-166/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | which can watch GetInterface calls and return custom interfaces. Added a basic unit test to validate that the custom factory does get called. This would eventually be used to register custom interfaces for plugins like NACL which rely on chrome\renderer provided functionality via the webkit_glue namespace. This will help in eventually building src\content as a dll. BUG=82454 TEST=covered by test shell tests. Review URL: http://codereview.chromium.org/6976035 make -k -j4 -r BUILDTYPE=Debug ACTION Extracting last change to /mnt/data/b/build/slave/Linux_Clang__ChromiumOS_dbg_/build/src/out/Debug/obj/gen/build/LASTCHANGE out/Debug/obj/gen/build/LASTCHANGE.always CXX(target) out/Debug/obj.target/glue/webkit/plugins/ppapi/plugin_module.o CXX(target) out/Debug/obj.target/glue/webkit/plugins/ppapi/ppapi_interface_factory.o In file included from webkit/plugins/ppapi/ppapi_interface_factory.cc:5: ./webkit/plugins/ppapi/ppapi_interface_factory.h:40:3: error: [chromium-style] Complex constructor has an inlined body. PpapiInterfaceFactoryManager() {} ^ ./webkit/plugins/ppapi/ppapi_interface_factory.h:41:3: error: [chromium-style] Complex destructor has an inline body. ~PpapiInterfaceFactoryManager() {} ^ 2 errors generated. In file included from webkit/plugins/ppapi/plugin_module.cc:75: ./webkit/plugins/ppapi/ppapi_interface_factory.h:40:3: error: [chromium-style] Complex constructor has an inlined body. PpapiInterfaceFactoryManager() {} ^ ./webkit/plugins/ppapi/ppapi_interface_factory.h:41:3: error: [chromium-style] Complex destructor has an inline body. ~PpapiInterfaceFactoryManager() {} ^ make: *** [out/Debug/obj.target/glue/webkit/plugins/ppapi/ppapi_interface_factory.o] Error 1 2 errors generated. make: *** [out/Debug/obj.target/glue/webkit/plugins/ppapi/plugin_module.o] Error 1 make: Target `all' not remade because of errors. http://build.chromium.org/p/chromium/builders/Linux%20Clang%20%28ChromiumOS%20dbg%29/builds/5023 TBR=ananta@chromium.org Review URL: http://codereview.chromium.org/7020014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87398 0039d316-1c4b-4281-b951-d872f2087c98
* Added a facility in PPAPI to register interface factories which can watch ↵ananta@chromium.org2011-05-314-0/+166
| | | | | | | | | | | | | | | | GetInterface calls and return custom interfaces. Added a basic unit test to validate that the custom factory does get called. This would eventually be used to register custom interfaces for plugins like NACL which rely on chrome\renderer provided functionality via the webkit_glue namespace. This will help in eventually building src\content as a dll. BUG=82454 TEST=covered by test shell tests. Review URL: http://codereview.chromium.org/6976035 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87396 0039d316-1c4b-4281-b951-d872f2087c98
* Fix PPAPITest.DirectoryReader:yzshen@chromium.org2011-05-311-1/+1
| | | | | | | | | | | | - make sure the result won't be affected by other tests or previous runs of the same test; - don't assert if the directory to read is empty. TEST=The test itself. BUG=63239 Review URL: http://codereview.chromium.org/7094008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87366 0039d316-1c4b-4281-b951-d872f2087c98
* Give FunctionGroupBase a virtual destructor.thakis@chromium.org2011-05-313-5/+5
| | | | | | | | | | | | | | | | HostDispatcher has a scoped_ptr<FunctionGroupBase>, so without this, it won't invoke destructors of objects implenting FunctionGroupBase (i.e. this is a real bug.) Found by clang's -Wdelete-non-virtual-dtor BUG=84424 TEST=none Review URL: http://codereview.chromium.org/7084034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87306 0039d316-1c4b-4281-b951-d872f2087c98
* Remove unused "virtual" keywords.thakis@chromium.org2011-05-311-1/+1
| | | | | | | | | | | | | | | These were added in http://codereview.chromium.org/4545003, but the classes they were added to do not derive from classes with these methods, and the classes don't have subclasses either. And the keyword confuses some tools. BUG=84424 TEST=none Review URL: http://codereview.chromium.org/7084035 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87298 0039d316-1c4b-4281-b951-d872f2087c98
* The first step for enabling off-the-spot IME on Pepper on ChromeOS/Linux.kinaba@google.com2011-05-304-0/+8
| | | | | | | | | | | | | | | | | | | | | BUG=83684 TEST=Go to http://weathernews.jp with pepper flash plug in enabled. Focus the text input field and type something with IME on. Verify that the candidate window is shown somewhere on the screen and commited text is entered in the text field. This patch is the first step toward off-the-spot IME on Pepper plugins hosted on RenderWidgetHostViewGtk. This patch: - Makes it possible to turn on/off IME when a plugin is focused. - Makes it possible for the plugin to receive committed results from IME. What are NOT IN this patch (and what I hope to improve in forthcoming separate patches) are: - Proper placement of the candidate window. - Showing preedit texts. Review URL: http://codereview.chromium.org/6990072 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87215 0039d316-1c4b-4281-b951-d872f2087c98
* Move Broker, Buffer, CharSet, and CursorControl to use the new thunk/API system.brettw@chromium.org2011-05-2717-277/+331
| | | | | | | | | | | This changes the way that the function APIs work in the webkit directory, now they're created per-instance rather than globally, and have their Plugininstance as a class member (this cleans up some code). I had to move the InstanceData member to be a linked_ptr due to copy constructor issues, but this should be more efficient anyway. Review URL: http://codereview.chromium.org/7077024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87094 0039d316-1c4b-4281-b951-d872f2087c98
* Add a new function to run and claer a completion callback. This is a commonbrettw@chromium.org2011-05-272-18/+6
| | | | | | | | | | | pattern and is a bit tricky since we need to clear it before actually executing the callback. TEST=ppapi ui_tests BUG=none Review URL: http://codereview.chromium.org/6962021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87028 0039d316-1c4b-4281-b951-d872f2087c98
* Add new PDF plugin resources for print preview.thestig@chromium.org2011-05-261-1/+5
| | | | | | | | BUG=80192 TEST=none Review URL: http://codereview.chromium.org/7075018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86896 0039d316-1c4b-4281-b951-d872f2087c98
* Use the WebKit default fonts when specifying generic font families.brettw@chromium.org2011-05-266-8/+73
| | | | | | | | | | | | | This pipes through a new preferences object that the font system can use. It now picks up these faces as well as the default font size. Clarify this behavior in the interface. TEST=manual (font example included). BUG=none Review URL: http://codereview.chromium.org/7053022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86870 0039d316-1c4b-4281-b951-d872f2087c98
* [Re-instate r86681 by reverting its revert in r86687.]fischman@chromium.org2011-05-261-5/+5
| | | | | | | | | | | | | | | Take 2: Updated OMX decoder for recent PPAPI changes, and added to the build. Had to move from content/gpu to content/common/gpu to allow gpu_video_service.cc to depend on the decoder. Removed some dead code and did some random cleanup while I was in there. BUG=none TEST=chrome compiles on cros/arm! Review URL: http://codereview.chromium.org/6992087 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86841 0039d316-1c4b-4281-b951-d872f2087c98
* This change implements a first pass in the effort to remove the dependency ↵twiz@chromium.org2011-05-264-7/+7
| | | | | | | | | | | | | | of PlatformDevice within Chrome. The Skia library now provides multiple back-ends for the SkDevice class, so PlatformDevice's inheritance of SkDevice, and the assumption of instances of PlatformDevice limits the use of these new back-ends. A new set of helper functions is provided for the PlatformDevice entry points. Upon construction of a PlatformDevice, a pointer to the interface is cached in the parent SkDevice's SkMetaData. The new helper functions forward calls to the interface cached in the metadata. BUG=NONE TEST=NONE Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=86625 Reverted: http://src.chromium.org/viewvc/chrome?view=rev&revision=86625 Review URL: http://codereview.chromium.org/7019013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86823 0039d316-1c4b-4281-b951-d872f2087c98
* Made the OS_LINUX ifdefs in ui/ and webkit/ directories more cross-platform, ↵chromium@hybridsource.org2011-05-251-1/+1
| | | | | | | | so that these files can be used on multiple POSIX platforms. Review URL: http://codereview.chromium.org/6990051 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86742 0039d316-1c4b-4281-b951-d872f2087c98
* Add initialization callback support for Video Decoder PPAPI.vrk@google.com2011-05-252-4/+21
| | | | | | | | | | | | | Initializing a decoder is asynchronous, so add a callback to tell client when the decoder is ready to use. I confirmed that this works locally using a C plugin that I wrote on my machine. BUG=NONE TEST=NONE Review URL: http://codereview.chromium.org/7065010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86699 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 86681 - Updated OMX decoder for recent PPAPI changes, and added to ↵fischman@chromium.org2011-05-251-5/+5
| | | | | | | | | | | | | | | | | | the build. Had to move from content/gpu to content/common/gpu to allow gpu_video_service.cc to depend on the decoder. Removed some dead code and did some random cleanup while I was in there. BUG=none TEST=chrome compiles on cros/arm! Review URL: http://codereview.chromium.org/7057027 TBR=fischman@chromium.org Review URL: http://codereview.chromium.org/6979017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86687 0039d316-1c4b-4281-b951-d872f2087c98
* Updated OMX decoder for recent PPAPI changes, and added to the build.fischman@chromium.org2011-05-251-5/+5
| | | | | | | | | | | | | Had to move from content/gpu to content/common/gpu to allow gpu_video_service.cc to depend on the decoder. Removed some dead code and did some random cleanup while I was in there. BUG=none TEST=chrome compiles on cros/arm! Review URL: http://codereview.chromium.org/7057027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86681 0039d316-1c4b-4281-b951-d872f2087c98
* ppapi: Work around a compiler bug where the PPP_Printing_Dev struct is not ↵thestig@chromium.org2011-05-251-1/+4
| | | | | | | | | | | zeroed out. BUG=83761 TEST=Print preview always work on Mac Review URL: http://codereview.chromium.org/7031044 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86676 0039d316-1c4b-4281-b951-d872f2087c98
* Add Skia to CG adapter for plugins.caryclark@chromium.org2011-05-253-12/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Skia on Mac uses Skia to render WebKit, and CG to render UI elements. The CG elements need a transcribed graphics context that preserves the canvas matrix, and the canvas clip. The SkiaBitLocker utility class sets up a CGContext from the SkCanvas, locks the bitmap's bits, and releases the lock when the class goes out of scope. The SkiaBitLocker implementation is described by this patch: http://codereview.chromium.org/7031006/ For ppapi, use the CG bitmap copy only if Skia is not used. Otherwise, adjust the Mac-specific code to convert the canvas to a CGContext as needed. Also, add a CG-specific entry point for painting so that the delegate can paint using a WebCanvas, while the proxy paints with a CGContext. This change adds a code path that will be enabled in the future, but does not modify any existing code, so there is no functional change. BUG=79463 TEST=none Review URL: http://codereview.chromium.org/6823081 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86662 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 86625 - This change implements a first pass in the effort to remove ↵vandebo@chromium.org2011-05-254-7/+7
| | | | | | | | | | | | | | | the dependency of PlatformDevice within Chrome. The Skia library now provides multiple back-ends for the SkDevice class, so PlatformDevice's inheritance of SkDevice, and the assumption of instances of PlatformDevice limits the use of these new back-ends. A new set of helper functions is provided for the PlatformDevice entry points. Upon construction of a PlatformDevice, a pointer to the interface is cached in the parent SkDevice's SkMetaData. The new helper functions forward calls to the interface cached in the metadata. BUG=NONE TEST=NONE Review URL: http://codereview.chromium.org/7019013 TBR=twiz@chromium.org Review URL: http://codereview.chromium.org/6987019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86629 0039d316-1c4b-4281-b951-d872f2087c98
* This change implements a first pass in the effort to remove the dependency ↵twiz@chromium.org2011-05-254-7/+7
| | | | | | | | | | | | of PlatformDevice within Chrome. The Skia library now provides multiple back-ends for the SkDevice class, so PlatformDevice's inheritance of SkDevice, and the assumption of instances of PlatformDevice limits the use of these new back-ends. A new set of helper functions is provided for the PlatformDevice entry points. Upon construction of a PlatformDevice, a pointer to the interface is cached in the parent SkDevice's SkMetaData. The new helper functions forward calls to the interface cached in the metadata. BUG=NONE TEST=NONE Review URL: http://codereview.chromium.org/7019013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86625 0039d316-1c4b-4281-b951-d872f2087c98
* Virtual destructors should have virtual keyword.hans@chromium.org2011-05-251-1/+1
| | | | | | | | | | | | | | | | | Make sure user-declared virtual destructors always have the virtual keyword. The Clang style-check plugin will check for this soon. No functionality change: virtual is only added to destructors that are already implicitly virtual. Also fix a couple of in-line destructor definitions. BUG=83408 TEST=none Review URL: http://codereview.chromium.org/7064033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86587 0039d316-1c4b-4281-b951-d872f2087c98
* Remove scripting from PPP_Instance and PPB_Instance (behind precompiler flag).dmichael@chromium.org2011-05-245-31/+94
| | | | | | | | | | | Create 0.5 versions of the instance interfaces that are the default only if PPAPI_INSTANCE_REMOVE_SCRIPTING is defined. This is so [hopefully] plugins can opt in to the new version and migrate to InstancePrivate/VarPrivate more easily. BUG=82606 TEST=PPAPI tests Review URL: http://codereview.chromium.org/7038044 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86458 0039d316-1c4b-4281-b951-d872f2087c98
* Change printing of PDFs for preview on Windows to not rasterize.vandebo@chromium.org2011-05-242-52/+59
| | | | | | | | | | | Also cleaned up a few hacks. BUG=80220 TEST=Navigate to a PDF and start print preview. Review URL: http://codereview.chromium.org/7065011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86431 0039d316-1c4b-4281-b951-d872f2087c98
* Fix PP_FileOpenFlags_Dev handling:yzshen@chromium.org2011-05-237-125/+109
| | | | | | | | | | | | | | | - rewrite the mapping from PP_FileOpenFlags_Dev to PlatformFileFlags. - let ppb_flash_file_impl and ppb_file_io_impl use the same mapping logic. - CreatePlatformFile: resolve the conflict between the win and posix implementation. Before this change, the win implementation didn't allow PLATFORM_FILE_TRUNCATE to be used with any of the (OPEN|CREATE)(_ALWAYS)? flags; while the posix implementation required it to be used with them. - add more test cases to test the behavior of different PP_FileOpenFlags_Dev combinations. - also unify the conversion from PlatformFileError to Pepper error. BUG=68489 TEST=New test cases in test_file_io.cc Review URL: http://codereview.chromium.org/7038032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86349 0039d316-1c4b-4281-b951-d872f2087c98
* Updated video decoder IPC to use PPB_Buffer_Dev's new support for SharedMemory. fischman@chromium.org2011-05-231-6/+4
| | | | | | | | | | | | Plumb through from renderer to GPU process' OMX decoder. BUG=none TEST=trybots Review URL: http://codereview.chromium.org/7034040 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86302 0039d316-1c4b-4281-b951-d872f2087c98
* Use appropriate FileSystemOperations in "filesystem:" URLRequestJobs.adamk@chromium.org2011-05-192-5/+0
| | | | | | | | | | | | | | | | | | | | FileSystemURLRequestJob now calls GetMetadata(), while FileSystemDirURLRequestJob calls ReadDirectory(). With neither calling GetLocalPath(), the need for FileSystemURLRequestJobBase has disappeared, as has the need for FileSystemOperation::GetLocalPath and FileSystemCallbackDispatcher::DidGetLocalPath(). The only changes in behavior due to this patch are: - ReadDirectory is now called on the URL, so it will still work properly after the obsfuscated filesystem is in use. - FileSystemDirURLRequestJob has been fixed to show a directory header. This was somehow lost in the refactor to use FileSystemURLRequestJobBase. - The error codes for "file not found" are now always net::ERR_FILE_NOT_FOUND. R=ericu@chromium.org Review URL: http://codereview.chromium.org/7047013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86015 0039d316-1c4b-4281-b951-d872f2087c98
* Fix bug introduced in r85773: PPB_Buffer_Impl::Init() never set size_!fischman@chromium.org2011-05-191-1/+4
| | | | | | | | | BUG=83207 TEST=./ninja/chrome --enable-print-preview /path/to/file.pdf has working print preview again, instead of either DCHECK crash (dbg build) or blank preview (release build) Review URL: http://codereview.chromium.org/7040019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85986 0039d316-1c4b-4281-b951-d872f2087c98
* Change PPP_Printing_Dev QuerySupportedFormats to not require MemAlloc and ↵dmichael@chromium.org2011-05-192-31/+124
| | | | | | | | | | | | | | | | | | | | | MemFree. This also is a first stab at providing backwards-compatibility (even though in this case 0.3 will go away once everyone is ported). To use the new version, you need to 'opt-in' by adding the following line before including ppp_printing_dev.h: #define PPP_PRINTING_DEV_USE_0_4 I have NOT updated the C++ wrapper. I can work on that next, although it would help to have some test code that relies on it to make sure I'm not breaking anything. brettw: Please focus on the backwards-compatibility code, let me know what you think. thestig: Please focus on print code. I'd appreciate any tips on being able to test this better; I don't have access to the PDF plugin code. I verified that the existing plugin still works with this change by copying in libpdf.so, opening a PDF, and printing it. BUG=80696 TEST=Manual. Try to print a PDF. Review URL: http://codereview.chromium.org/6975018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85912 0039d316-1c4b-4281-b951-d872f2087c98