2008-06-30 Anders Carlsson <andersca@apple.com>
commitc672775df1db805370355227e376fd0bc0e9a976
authorandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 1 Jul 2008 18:31:22 +0000 (1 18:31 +0000)
committerandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 1 Jul 2008 18:31:22 +0000 (1 18:31 +0000)
treef92a1dc40073d81135789abb649b2d6d9764a635
parentbe748d99ded14ed1f2ef80a4cdf162036d5f46ad
2008-06-30  Anders Carlsson  <andersca@apple.com>

        Reviewed by Adam.

        Add PluginMainThreadScheduler, a singleton which is responsible for scheduling plug-in
        callbacks on the main thread. Use this to implement NPN_PluginThreadAsyncCall on Windows.

        * WebCore.vcproj/WebCore.vcproj:
        Add PluginMainThreadScheduler.{cpp|h}

        * plugins/PluginMainThreadScheduler.cpp: Added.
        * plugins/PluginMainThreadScheduler.h: Added.

        * plugins/PluginView.cpp:
        (WebCore::PluginView::start):
        Register with the thread scheduler.

        * plugins/npapi.cpp:
        (NPN_PluginThreadAsyncCall):
        Call the thread scheduler.

        * plugins/win/PluginPackageWin.cpp:
        (WebCore::PluginPackage::load):
        Initialize the NPN_PluginThreadAsyncCall callback.

        * plugins/win/PluginViewWin.cpp:
        (WebCore::PluginView::stop):
        Unregister with the scheduler. This makes sure that we won't try to deliver callbacks
        after the plug-in has been destroyed.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34926 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebCore/ChangeLog
WebCore/WebCore.vcproj/WebCore.vcproj
WebCore/plugins/PluginMainThreadScheduler.cpp [new file with mode: 0644]
WebCore/plugins/PluginMainThreadScheduler.h [new file with mode: 0644]
WebCore/plugins/PluginView.cpp
WebCore/plugins/npapi.cpp
WebCore/plugins/win/PluginPackageWin.cpp
WebCore/plugins/win/PluginViewWin.cpp