Commit b502dd04 authored by eseidel's avatar eseidel

2006-02-27 Eric Seidel <eseidel@apple.com>

        Reviewed by ggaren.

        Move KConfig to platform/PlugInInfoStore and add test.
        http://bugzilla.opendarwin.org/show_bug.cgi?id=7498

        Test: plugins/plugin-javascript-access.html

        * ForwardingHeaders/kconfig.h: Removed.
        * WebCore.xcodeproj/project.pbxproj:
        * khtml/ecma/kjs_navigator.cpp:
        (KJS::PluginBase::PluginBase):
        * khtml/ecma/kjs_window.cpp:
        * kwq/KWQKConfigBase.h: Removed.
        * kwq/KWQKConfigBase.mm: Removed.
        * platform/PlugInInfoStore.h: Added.
        * platform/mac/PlugInInfoStoreMac.mm: Added.
        (WebCore::PlugInInfoStore::createPluginInfoForPluginAtIndex):
        (WebCore::PlugInInfoStore::pluginCount):
        (WebCore::refreshPlugins):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@13020 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent d5f933d8
2006-02-27 Eric Seidel <eseidel@apple.com>
Reviewed by ggaren.
Move KConfig to platform/PlugInInfoStore and add test.
http://bugzilla.opendarwin.org/show_bug.cgi?id=7498
Test: plugins/plugin-javascript-access.html
* ForwardingHeaders/kconfig.h: Removed.
* WebCore.xcodeproj/project.pbxproj:
* khtml/ecma/kjs_navigator.cpp:
(KJS::PluginBase::PluginBase):
* khtml/ecma/kjs_window.cpp:
* kwq/KWQKConfigBase.h: Removed.
* kwq/KWQKConfigBase.mm: Removed.
* platform/PlugInInfoStore.h: Added.
* platform/mac/PlugInInfoStoreMac.mm: Added.
(WebCore::PlugInInfoStore::createPluginInfoForPluginAtIndex):
(WebCore::PlugInInfoStore::pluginCount):
(WebCore::refreshPlugins):
2006-02-27 Darin Adler <darin@apple.com>
Reviewed by Eric.
......
This diff is collapsed.
......@@ -24,7 +24,7 @@
#include "config.h"
#include <klocale.h>
#include <kconfig.h>
#include <PlugInInfoStore.h>
#include "kjs_navigator.h"
#include "kjs/lookup.h"
......@@ -219,7 +219,7 @@ PluginBase::PluginBase(ExecState *exec)
mimes = new Vector<MimeClassInfo*>;
// read configuration
PluginInfoStore c;
PlugInInfoStore c;
unsigned pluginCount = c.pluginCount();
for (unsigned n = 0; n < pluginCount; n++) {
PluginInfo* plugin = c.createPluginInfoForPluginAtIndex(n);
......
......@@ -27,7 +27,7 @@
#include "FrameView.h"
#include "JSMutationEvent.h"
#include "JSXMLHttpRequest.h"
#include "KWQKConfigBase.h"
#include "PlugInInfoStore.h"
#include "KWQLogging.h"
#include "Screen.h"
#include "SelectionController.h"
......@@ -52,7 +52,6 @@
#include "kjs_traversal.h"
#include "render_canvas.h"
#include "xmlserializer.h"
#include <kconfig.h>
#include <kjs/collector.h>
#include <klocale.h>
#include "FrameTree.h"
......
......@@ -23,8 +23,8 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef PluginConfig_H
#define PluginConfig_H
#ifndef PlugInInfoStore_H
#define PlugInInfoStore_H
#include "PlatformString.h"
#include <kxmlcore/Vector.h>
......@@ -47,18 +47,13 @@ struct PluginInfo {
Vector<MimeClassInfo*> mimes;
};
class PluginInfoStore {
class PlugInInfoStore {
public:
PluginInfoStore() { }
PluginInfo *createPluginInfoForPluginAtIndex(unsigned);
unsigned pluginCount() const;
private:
PluginInfoStore(const PluginInfoStore&);
PluginInfoStore &operator=(const PluginInfoStore&);
unsigned pluginCount() const;
};
void refreshPlugins(bool reload);
void refreshPlugins(bool reloadOpenPages);
}
......
......@@ -23,8 +23,8 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "config.h"
#import "KWQKConfigBase.h"
#import "config.h"
#import "PlugInInfoStore.h"
#import "KWQExceptions.h"
#import "KWQLogging.h"
......@@ -32,7 +32,7 @@
namespace WebCore {
PluginInfo *PluginInfoStore::createPluginInfoForPluginAtIndex(unsigned index)
PluginInfo *PlugInInfoStore::createPluginInfoForPluginAtIndex(unsigned index)
{
PluginInfo *pluginInfo = new PluginInfo;
......@@ -65,7 +65,7 @@ PluginInfo *PluginInfoStore::createPluginInfoForPluginAtIndex(unsigned index)
return 0;
}
unsigned PluginInfoStore::pluginCount() const
unsigned PlugInInfoStore::pluginCount() const
{
KWQ_BLOCK_EXCEPTIONS;
return [[[WebCoreViewFactory sharedFactory] pluginsInfo] count];
......@@ -74,10 +74,10 @@ unsigned PluginInfoStore::pluginCount() const
return 0;
}
void refreshPlugins(bool reload)
void refreshPlugins(bool reloadOpenPages)
{
KWQ_BLOCK_EXCEPTIONS;
[[WebCoreViewFactory sharedFactory] refreshPlugins:reload];
[[WebCoreViewFactory sharedFactory] refreshPlugins:reloadOpenPages];
KWQ_UNBLOCK_EXCEPTIONS;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment