5 // Created by Chris Blumenberg on Tue Oct 22 2002.
6 // Copyright (c) 2002 Apple Computer, Inc. All rights reserved.
9 #import <WebKit/WebPluginPackage.h>
11 #import <WebKit/WebKitLogging.h>
12 #import <WebKit/WebKitNSStringExtras.h>
14 #import <Foundation/NSPrivateDecls.h>
16 NSString *WebPlugInBaseURLKey = @"WebPlugInBaseURLKey";
17 NSString *WebPlugInAttributesKey = @"WebPlugInAttributesKey";
18 NSString *WebPlugInContainerKey = @"WebPlugInContainerKey";
19 NSString *WebPlugInModeKey = @"WebPlugInModeKey";
22 @constant WebPlugInContainingElementKey The DOMElement that was used to specify
23 the plug-in. May be nil.
25 extern NSString *WebPlugInContainingElementKey;
27 @implementation WebPluginPackage
29 - initWithPath:(NSString *)pluginPath
31 [super initWithPath:pluginPath];
38 if (![[pluginPath pathExtension] _webkit_isCaseInsensitiveEqualToString:@"webplugin"]) {
40 CFBundleGetPackageInfo([bundle _cfBundle], &type, NULL);
41 if (type != FOUR_CHAR_CODE('WBPL')) {
47 if (![self getPluginInfoFromPLists]) {
57 return [bundle principalClass];
67 CFAbsoluteTime start = CFAbsoluteTimeGetCurrent();
70 [bundle principalClass];
71 isLoaded = [bundle isLoaded];
77 CFAbsoluteTime duration = CFAbsoluteTimeGetCurrent() - start;
78 LOG(Plugins, "principalClass took %f seconds for: %@", duration, [self name]);
89 return [bundle isLoaded];
94 @implementation NSObject (WebScripting)
96 + (BOOL)isSelectorExcludedFromWebScript:(SEL)aSelector
101 + (BOOL)isKeyExcludedFromWebScript:(const char *)name