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 NSString *WebPlugInBaseURLKey = @"WebPlugInBaseURLKey";
15 NSString *WebPlugInAttributesKey = @"WebPlugInAttributesKey";
16 NSString *WebPlugInContainerKey = @"WebPlugInContainerKey";
17 NSString *WebPlugInModeKey = @"WebPlugInModeKey";
20 @constant WebPlugInContainingElementKey The DOMElement that was used to specify
21 the plug-in. May be nil.
23 extern NSString *WebPlugInContainingElementKey;
25 @implementation WebPluginPackage
27 - initWithPath:(NSString *)pluginPath
29 [super initWithPath:pluginPath];
36 if (![[pluginPath pathExtension] _webkit_isCaseInsensitiveEqualToString:@"webplugin"]) {
38 CFBundleGetPackageInfo(cfBundle, &type, NULL);
39 if (type != FOUR_CHAR_CODE('WBPL')) {
45 if (![self getPluginInfoFromPLists]) {
55 return [bundle principalClass];
65 CFAbsoluteTime start = CFAbsoluteTimeGetCurrent();
68 [bundle principalClass];
69 isLoaded = [bundle isLoaded];
75 CFAbsoluteTime duration = CFAbsoluteTimeGetCurrent() - start;
76 LOG(Plugins, "principalClass took %f seconds for: %@", duration, [self name]);
87 return [bundle isLoaded];
92 @implementation NSObject (WebScripting)
94 + (BOOL)isSelectorExcludedFromWebScript:(SEL)aSelector
99 + (BOOL)isKeyExcludedFromWebScript:(const char *)name