Commit 077d5564 authored by cblu's avatar cblu

WebCore:

	Fixed: <rdar://problem/3333897>: should support navigator.plugins.refresh as a way to add a plugin without restarting Safari

        Reviewed by rjw.

        * khtml/ecma/kjs_navigator.cpp:
        (PluginBase::refresh): new
        (PluginsFunc::tryCall): call refresh
        * kwq/KWQKConfigBase.h:
        * kwq/KWQKConfigBase.mm:
        (RefreshPlugins): new
        * kwq/WebCoreViewFactory.h:

WebKit:

	Fixed: <rdar://problem/3333897>: should support navigator.plugins.refresh as a way to add a plugin without restarting Safari

        Reviewed by rjw.

        * Plugins.subproj/WebBaseNetscapePluginView.m:
        (-[WebBaseNetscapePluginView dealloc]): release the plug-in object
        * Plugins.subproj/WebBasePluginPackage.h:
        * Plugins.subproj/WebBasePluginPackage.m:
        (-[WebBasePluginPackage initWithPath:]): store the last mod date
        (-[WebBasePluginPackage dealloc]): release the last mod date
        (-[WebBasePluginPackage lastModifiedDate]): new
        (-[WebBasePluginPackage isEqual:]): new
        (-[WebBasePluginPackage hash]): new
        * Plugins.subproj/WebNetscapePluginPackage.m:
        (-[WebNetscapePluginPackage load]): convert the NPP_Shutdown proc pointer so that we can use it later
        (-[WebNetscapePluginPackage unload]): added log message
        * Plugins.subproj/WebPluginDatabase.h:
        * Plugins.subproj/WebPluginDatabase.m:
        (-[WebPluginDatabase pluginForKey:withEnumeratorSelector:]): tweak
        (-[WebPluginDatabase plugins]): tweak
        (-[WebPluginDatabase init]): call refresh
        (-[WebPluginDatabase refresh]): new
        (-[WebPluginDatabase loadPluginIfNeededForMIMEType:]): tweak
        * WebCoreSupport.subproj/WebViewFactory.m:
        (-[WebViewFactory refreshPlugins:]): new
        * WebView.subproj/WebControllerSets.h:
        * WebView.subproj/WebControllerSets.m:
        (+[WebViewSets makeWebViewsPerformSelector:]): new
        * WebView.subproj/WebFrame.m:
        (-[WebFrame _reloadForPluginChanges]): new
        * WebView.subproj/WebFramePrivate.h:
        * WebView.subproj/WebView.m:
        (-[WebView _reloadForPluginChanges]): new
        * WebView.subproj/WebViewPrivate.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@5158 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 42504e4f
2003-10-09 Chris Blumenberg <cblu@apple.com>
Fixed: <rdar://problem/3333897>: should support navigator.plugins.refresh as a way to add a plugin without restarting Safari
Reviewed by rjw.
* khtml/ecma/kjs_navigator.cpp:
(PluginBase::refresh): new
(PluginsFunc::tryCall): call refresh
* kwq/KWQKConfigBase.h:
* kwq/KWQKConfigBase.mm:
(RefreshPlugins): new
* kwq/WebCoreViewFactory.h:
=== Safari-109 ===
2003-10-08 David Hyatt <hyatt@apple.com>
......
2003-10-09 Chris Blumenberg <cblu@apple.com>
Fixed: <rdar://problem/3333897>: should support navigator.plugins.refresh as a way to add a plugin without restarting Safari
Reviewed by rjw.
* khtml/ecma/kjs_navigator.cpp:
(PluginBase::refresh): new
(PluginsFunc::tryCall): call refresh
* kwq/KWQKConfigBase.h:
* kwq/KWQKConfigBase.mm:
(RefreshPlugins): new
* kwq/WebCoreViewFactory.h:
=== Safari-109 ===
2003-10-08 David Hyatt <hyatt@apple.com>
......
......@@ -46,6 +46,8 @@ namespace KJS {
public:
PluginBase(ExecState *exec);
virtual ~PluginBase();
void refresh(bool reload);
struct MimeClassInfo;
struct PluginInfo;
......@@ -321,6 +323,17 @@ PluginBase::~PluginBase()
}
}
void PluginBase::refresh(bool reload)
{
delete plugins;
delete mimes;
plugins = 0;
mimes = 0;
#if APPLE_CHANGES
RefreshPlugins(reload);
#endif
}
/*******************************************************************/
IMPLEMENT_PROTOFUNC(PluginsFunc)
......@@ -442,9 +455,10 @@ Value MimeType::get(ExecState *exec, const Identifier &propertyName) const
}
Value PluginsFunc::tryCall(ExecState *, Object &, const List &)
Value PluginsFunc::tryCall(ExecState *exec, Object &, const List &args)
{
return Undefined();
PluginBase(exec).refresh(args[0].toBoolean(exec));
return Undefined();
}
......
......@@ -68,4 +68,6 @@ private:
};
void RefreshPlugins(bool reload);
#endif
......@@ -142,3 +142,9 @@ QStringList KConfig::readListEntry(const QString &pKey, char sep) const
ERROR("not yet implemented");
return QStringList();
}
void RefreshPlugins(bool reload)
{
[[WebCoreViewFactory sharedFactory] refreshPlugins:reload];
}
......@@ -31,6 +31,7 @@
@protocol WebCoreViewFactory
- (NSArray *)pluginsInfo; // array of id <WebCorePluginInfo>
- (void)refreshPlugins:(BOOL)reloadPages;
- (NSString *)inputElementAltText;
- (NSString *)resetButtonDefaultLabel;
......
2003-10-09 Chris Blumenberg <cblu@apple.com>
Fixed: <rdar://problem/3333897>: should support navigator.plugins.refresh as a way to add a plugin without restarting Safari
Reviewed by rjw.
* Plugins.subproj/WebBaseNetscapePluginView.m:
(-[WebBaseNetscapePluginView dealloc]): release the plug-in object
* Plugins.subproj/WebBasePluginPackage.h:
* Plugins.subproj/WebBasePluginPackage.m:
(-[WebBasePluginPackage initWithPath:]): store the last mod date
(-[WebBasePluginPackage dealloc]): release the last mod date
(-[WebBasePluginPackage lastModifiedDate]): new
(-[WebBasePluginPackage isEqual:]): new
(-[WebBasePluginPackage hash]): new
* Plugins.subproj/WebNetscapePluginPackage.m:
(-[WebNetscapePluginPackage load]): convert the NPP_Shutdown proc pointer so that we can use it later
(-[WebNetscapePluginPackage unload]): added log message
* Plugins.subproj/WebPluginDatabase.h:
* Plugins.subproj/WebPluginDatabase.m:
(-[WebPluginDatabase pluginForKey:withEnumeratorSelector:]): tweak
(-[WebPluginDatabase plugins]): tweak
(-[WebPluginDatabase init]): call refresh
(-[WebPluginDatabase refresh]): new
(-[WebPluginDatabase loadPluginIfNeededForMIMEType:]): tweak
* WebCoreSupport.subproj/WebViewFactory.m:
(-[WebViewFactory refreshPlugins:]): new
* WebView.subproj/WebControllerSets.h:
* WebView.subproj/WebControllerSets.m:
(+[WebViewSets makeWebViewsPerformSelector:]): new
* WebView.subproj/WebFrame.m:
(-[WebFrame _reloadForPluginChanges]): new
* WebView.subproj/WebFramePrivate.h:
* WebView.subproj/WebView.m:
(-[WebView _reloadForPluginChanges]): new
* WebView.subproj/WebViewPrivate.h:
=== Safari-109 ===
2003-10-03 Richard Williamson (Home0 <rjw@apple.com>
2003-10-03 Richard Williamson <rjw@apple.com>
Fix part of 3438071. Creating an instance of WebPreferences using init
will do the expected thing: that is, create a new instance! We used to
......
......@@ -901,8 +901,9 @@ - (WebNetscapePluginPackage *)plugin
- (void)setPlugin:(WebNetscapePluginPackage *)thePlugin;
{
[thePlugin retain];
[plugin release];
plugin = [thePlugin retain];
plugin = thePlugin;
NPP_New = [plugin NPP_New];
NPP_Destroy = [plugin NPP_Destroy];
......@@ -1007,11 +1008,10 @@ -(void)dealloc
free(cAttributes[i]);
free(cValues[i]);
}
[streams removeAllObjects];
[plugin release];
[streams release];
[MIMEType release];
[baseURL release];
[streamNotifications removeAllObjects];
[streamNotifications release];
free(cAttributes);
free(cValues);
......
......@@ -26,6 +26,8 @@
NSString *pluginDescription;
NSBundle *bundle;
NSDate *lastModifiedDate;
NSDictionary *MIMEToDescription;
NSDictionary *MIMEToExtensions;
......@@ -46,6 +48,7 @@
- (NSString *)filename;
- (NSString *)pluginDescription;
- (NSBundle *)bundle;
- (NSDate *)lastModifiedDate;
- (NSEnumerator *)extensionEnumerator;
- (NSEnumerator *)MIMETypeEnumerator;
......
......@@ -60,9 +60,10 @@ - (NSString *)pathByResolvingSymlinksAndAliasesInPath:(NSString *)thePath
- initWithPath:(NSString *)pluginPath
{
[super init];
extensionToMIME = [[NSMutableDictionary dictionary] retain];
extensionToMIME = [[NSMutableDictionary alloc] init];
path = [[self pathByResolvingSymlinksAndAliasesInPath:pluginPath] retain];
bundle = [[NSBundle alloc] initWithPath:path];
lastModifiedDate = [[[[NSFileManager defaultManager] fileAttributesAtPath:path traverseLink:YES] objectForKey:NSFileModificationDate] retain];
return self;
}
......@@ -148,6 +149,8 @@ - (void)unload
- (void)dealloc
{
[self unload];
[name release];
[path release];
[pluginDescription release];
......@@ -211,6 +214,11 @@ - (NSBundle *)bundle
return bundle;
}
- (NSDate *)lastModifiedDate
{
return lastModifiedDate;
}
- (void)setName:(NSString *)theName
{
[name release];
......@@ -265,6 +273,18 @@ - (NSString *)description
name, path, [MIMEToExtensions description], [MIMEToDescription description], pluginDescription];
}
- (BOOL)isEqual:(id)object
{
return ([object isKindOfClass:[WebBasePluginPackage class]] &&
[[object name] isEqualToString:name] &&
[[object lastModifiedDate] isEqual:lastModifiedDate]);
}
- (unsigned)hash
{
return [[name stringByAppendingString:[lastModifiedDate description]] hash];
}
@end
@implementation NSArray (WebPluginExtensions)
......
......@@ -339,7 +339,7 @@ - (BOOL)load
if (isLoaded) {
return YES;
}
if (isBundle) {
CFBundleRef cfBundle = [bundle _cfBundle];
if (!CFBundleLoadExecutable(cfBundle)) {
......@@ -440,7 +440,9 @@ - (BOOL)load
CFAbsoluteTime mainStart = CFAbsoluteTimeGetCurrent();
#endif
LOG(Plugins, "%f main timing started", mainStart);
npErr = pluginMainFunc(&browserFuncs, &pluginFuncs, &NPP_Shutdown);
NPP_ShutdownProcPtr shutdownFunction;
npErr = pluginMainFunc(&browserFuncs, &pluginFuncs, &shutdownFunction);
NPP_Shutdown = (NPP_ShutdownProcPtr)functionPointerForTVector((TransitionVector)shutdownFunction);
if (!isBundle) {
// Don't free pluginMainFunc if we got it from a bundle because it is owned by CFBundle in that case.
free(pluginMainFunc);
......@@ -575,6 +577,8 @@ - (void)unload
if (!isLoaded) {
return;
}
LOG(Plugins, "Unloading %@...", name);
NPP_Shutdown();
......
......@@ -9,8 +9,8 @@
@interface WebPluginDatabase : NSObject
{
NSArray *plugins;
NSMutableArray *pendingPluginLoads;
NSMutableSet *plugins;
NSMutableSet *pendingPluginLoads;
}
+ (WebPluginDatabase *)installedPlugins;
......@@ -21,6 +21,8 @@
- (NSArray *)plugins;
- (void)refresh;
- (void)loadPluginIfNeededForMIMEType:(NSString *)MIMEType;
@end
......@@ -5,7 +5,7 @@
#import <WebKit/WebAssertions.h>
#import <WebKit/WebBasePluginPackage.h>
#import <WebKit/WebDataSource.h>
#import <WebKit/WebDataSourcePrivate.h>
#import <WebKit/WebFrame.h>
#import <WebKit/WebFrameViewPrivate.h>
#import <WebKit/WebKitLogging.h>
......@@ -95,12 +95,11 @@ - (BOOL)canUsePlugin:(WebBasePluginPackage *)plugin
- (WebBasePluginPackage *)pluginForKey:(NSString *)key withEnumeratorSelector:(SEL)enumeratorSelector
{
WebBasePluginPackage *plugin, *CFMPlugin=nil, *machoPlugin=nil, *webPlugin=nil;
NSString *lowercaseKey = [key lowercaseString];
uint i;
NSEnumerator *pluginEnumerator = [plugins objectEnumerator];
key = [key lowercaseString];
for (i=0; i<[plugins count]; i++) {
plugin = [plugins objectAtIndex:i];
if ([[[plugin performSelector:enumeratorSelector] allObjects] containsObject:lowercaseKey]) {
while ((plugin = [pluginEnumerator nextObject]) != nil) {
if ([[[plugin performSelector:enumeratorSelector] allObjects] containsObject:key]) {
if ([plugin isKindOfClass:[WebPluginPackage class]]) {
if (webPlugin == nil) {
webPlugin = plugin;
......@@ -149,7 +148,7 @@ - (WebBasePluginPackage *)pluginForExtension:(NSString *)extension
- (NSArray *)plugins
{
return plugins;
return [plugins allObjects];
}
static NSArray *pluginLocations(void)
......@@ -173,89 +172,102 @@ - (NSArray *)plugins
if (self == nil) {
return nil;
}
[self refresh];
return self;
NSArray *pluginDirectories = pluginLocations();
}
- (void)refresh
{
NSEnumerator *directoryEnumerator = [pluginLocations() objectEnumerator];
NSMutableSet *uniqueFilenames = [[NSMutableArray alloc] init];
NSFileManager *fileManager = [NSFileManager defaultManager];
NSMutableArray *pluginPaths = [NSMutableArray arrayWithCapacity:10];
NSMutableSet *filenames = [NSMutableSet setWithCapacity:10];
NSArray *files;
NSString *file;
uint i, j, n;
NSMutableSet *newPlugins = [[NSMutableSet alloc] init];
NSString *pluginDirectory;
for (i = 0; i < [pluginDirectories count]; i++) {
files = [fileManager directoryContentsAtPath:[pluginDirectories objectAtIndex:i]];
for (n = 0; n < [files count]; n++) {
file = [files objectAtIndex:n];
if (![filenames containsObject:file]) { // avoid duplicates
[filenames addObject:file];
[pluginPaths addObject:[[pluginDirectories objectAtIndex:i] stringByAppendingPathComponent:file]];
// Create a new set of plug-ins.
while ((pluginDirectory = [directoryEnumerator nextObject]) != nil) {
NSEnumerator *filenameEnumerator = [[fileManager directoryContentsAtPath:pluginDirectory] objectEnumerator];
NSString *filename;
while ((filename = [filenameEnumerator nextObject]) != nil) {
if (![uniqueFilenames containsObject:filename]) {
[uniqueFilenames addObject:filename];
NSString *pluginPath = [pluginDirectory stringByAppendingPathComponent:filename];
WebBasePluginPackage *pluginPackage = [WebBasePluginPackage pluginWithPath:pluginPath];
if (pluginPackage) {
[newPlugins addObject:pluginPackage];
}
}
}
}
NSMutableArray *pluginArray = [NSMutableArray arrayWithCapacity:[pluginPaths count]];
[uniqueFilenames release];
for (i = 0; i < [pluginPaths count]; i++) {
WebBasePluginPackage *pluginPackage = [WebBasePluginPackage pluginWithPath:[pluginPaths objectAtIndex:i]];
if (pluginPackage) {
[pluginArray addObject:pluginPackage];
LOG(Plugins, "Found plugin: %s", [[pluginPackage name] lossyCString]);
LOG(Plugins, "%s", [[pluginPackage description] lossyCString]);
// Remove all uninstalled plug-ins and add the new plug-ins.
if (plugins) {
NSMutableSet *pluginsToUnload = [plugins mutableCopy];
[pluginsToUnload minusSet:newPlugins];
#if !LOG_DISABLED
NSMutableSet *reallyNewPlugins = [newPlugins mutableCopy];
[reallyNewPlugins minusSet:plugins];
if ([reallyNewPlugins count] > 0) {
LOG(Plugins, "New plugins:\n%@", reallyNewPlugins);
}
if ([pluginsToUnload count] > 0) {
LOG(Plugins, "Removed plugins:\n%@", pluginsToUnload);
}
[reallyNewPlugins release];
#endif
[plugins minusSet:pluginsToUnload];
[plugins unionSet:newPlugins];
[pluginsToUnload release];
[newPlugins release];
} else {
LOG(Plugins, "Plugin database initialization:\n%@", newPlugins);
plugins = newPlugins;
}
plugins = [pluginArray copy];
// Register plug-in WebDocumentViews and WebDocumentRepresentations
NSArray *viewTypes = [[WebFrameView _viewTypesAllowImageTypeOmission:NO] allKeys];
NSArray *mimes;
NSString *mime;
WebBasePluginPackage *plugin;
uint pluginCount, mimeCount;
pluginCount = [plugins count];
for (i = 0; i < pluginCount; i++) {
plugin = [plugins objectAtIndex:i];
mimes = [[plugin MIMETypeEnumerator] allObjects];
if ([plugin isKindOfClass:[WebNetscapePluginPackage class]]){
mimeCount = [mimes count];
for (j = 0; j < mimeCount; j++){
mime = [mimes objectAtIndex:j];
// Don't override previously registered types.
if(![viewTypes containsObject:mime]){
// Cocoa plugins must register themselves.
[WebView registerViewClass:[WebNetscapePluginDocumentView class] representationClass:[WebNetscapePluginRepresentation class] forMIMEType:mime];
// Unregister netscape plug-in WebDocumentViews and WebDocumentRepresentations.
NSMutableDictionary *MIMEToViewClass = [WebFrameView _viewTypesAllowImageTypeOmission:NO];
NSEnumerator *keyEnumerator = [MIMEToViewClass keyEnumerator];
NSString *MIMEType;
while ((MIMEType = [keyEnumerator nextObject]) != nil) {
if ([MIMEToViewClass objectForKey:MIMEType] == [WebNetscapePluginDocumentView class]) {
[WebView _unregisterViewClassAndRepresentationClassForMIMEType:MIMEType];
}
}
// Register netscape plug-in WebDocumentViews and WebDocumentRepresentations
// but do not override other document views and representations.
NSEnumerator *pluginEnumerator = [plugins objectEnumerator];
WebBasePluginPackage *plugin;
while ((plugin = [pluginEnumerator nextObject]) != nil) {
if ([plugin isKindOfClass:[WebNetscapePluginPackage class]]) {
NSEnumerator *MIMEEnumerator = [plugin MIMETypeEnumerator];
while ((MIMEType = [MIMEEnumerator nextObject]) != nil) {
if ([MIMEToViewClass objectForKey:MIMEType] == nil) {
[WebView registerViewClass:[WebNetscapePluginDocumentView class] representationClass:[WebNetscapePluginRepresentation class] forMIMEType:MIMEType];
}
}
}
else {
if (!pendingPluginLoads)
pendingPluginLoads = [[NSMutableArray alloc] init];
[pendingPluginLoads addObject: plugin];
} else {
if (![plugin isLoaded]) {
if (!pendingPluginLoads) {
pendingPluginLoads = [[NSMutableSet alloc] init];
}
[pendingPluginLoads addObject:plugin];
}
}
}
return self;
}
- (void)loadPluginIfNeededForMIMEType: (NSString *)MIMEType
{
NSArray *mimes;
NSEnumerator *pluginEnumerator = [pendingPluginLoads objectEnumerator];
WebBasePluginPackage *plugin;
int i, pluginCount;
pluginCount = [pendingPluginLoads count];
for (i = pluginCount-1; i >= 0; i--){
plugin = [pendingPluginLoads objectAtIndex:i];
mimes = [[plugin MIMETypeEnumerator] allObjects];
if ([mimes containsObject: MIMEType]){
[[plugin bundle] load];
[pendingPluginLoads removeObject: plugin];
continue;
while ((plugin = [pluginEnumerator nextObject]) != nil) {
if ([[[plugin MIMETypeEnumerator] allObjects] containsObject:MIMEType]) {
[plugin load];
[pendingPluginLoads removeObject:plugin];
}
}
}
......
......@@ -9,6 +9,7 @@
#import <WebKit/WebViewFactory.h>
#import <WebKit/WebAssertions.h>
#import <WebKit/WebControllerSets.h>
#import <WebKit/WebLocalizableStrings.h>
#import <WebKit/WebPluginDatabase.h>
......@@ -28,6 +29,14 @@ - (NSArray *)pluginsInfo
return [[WebPluginDatabase installedPlugins] plugins];
}
- (void)refreshPlugins:(BOOL)reloadPages
{
[[WebPluginDatabase installedPlugins] refresh];
if (reloadPages) {
[WebViewSets makeWebViewsPerformSelector:@selector(_reloadForPluginChanges)];
}
}
- (NSString *)inputElementAltText
{
return UI_STRING_KEY("Submit", "Submit (input element)", "alt text for <input> elements with no alt, title, or value");
......
......@@ -12,6 +12,7 @@
+ (void)addWebView:(WebView *)webView toSetNamed:(NSString *)name;
+ (void)removeWebView:(WebView *)webView fromSetNamed:(NSString *)name;
+ (NSEnumerator *)webViewsInSetNamed:(NSString *)name;
+ (void)makeWebViewsPerformSelector:(SEL)selector;
@end
......
......@@ -63,6 +63,15 @@ +(NSEnumerator *)webViewsInSetNamed:(NSString *)name;
return [(NSSet *)set objectEnumerator];
}
+ (void)makeWebViewsPerformSelector:(SEL)selector
{
NSEnumerator *setEnumerator = [sets objectEnumerator];
NSMutableSet *set;
while ((set = [setEnumerator nextObject]) != nil) {
[set makeObjectsPerformSelector:selector];
}
}
@end
......
......@@ -18,6 +18,10 @@
#import <WebKit/WebHTMLViewPrivate.h>
#import <WebKit/WebKitStatisticsPrivate.h>
#import <WebKit/WebKitLogging.h>
#import <WebKit/WebNetscapePluginDocumentView.h>
#import <WebKit/WebNetscapePluginEmbeddedView.h>
#import <WebKit/WebNullPluginView.h>
#import <WebKit/WebPlugin.h>
#import <WebKit/WebViewPrivate.h>
#import <WebKit/WebUIDelegate.h>
......@@ -2304,6 +2308,28 @@ - (NSColor *)_bodyBackgroundColor
return [_private->bridge bodyBackgroundColor];
}
- (void)_reloadForPluginChanges;
{
NSView <WebDocumentView> *documentView = [[self frameView] documentView];
if ([documentView isKindOfClass:[WebNetscapePluginDocumentView class]]) {
[self reload];
} else if ([documentView isKindOfClass:[WebHTMLView class]]) {
NSEnumerator *viewEnumerator = [[documentView subviews] objectEnumerator];
NSView *view;
while ((view = [viewEnumerator nextObject]) != nil) {
if ([view isKindOfClass:[WebNetscapePluginEmbeddedView class]] ||
[view isKindOfClass:[WebNullPluginView class]] ||
[view conformsToProtocol:@protocol(WebPlugin)]) {
[self reload];
break;
}
}
} else {
[[self childFrames] makeObjectsPerformSelector:@selector(_reloadForPluginChanges)];
}
}
@end
@implementation WebFormState : NSObject
......
......@@ -195,4 +195,6 @@ extern NSString *WebPageCacheDocumentViewKey;
- (NSColor *)_bodyBackgroundColor;
- (void)_reloadForPluginChanges;
@end
......@@ -634,6 +634,12 @@ - (void)_closeWindow
[[self _UIDelegateForwarder] webViewClose:self];
}
+ (void)_unregisterViewClassAndRepresentationClassForMIMEType:(NSString *)MIMEType;
{
[[WebFrameView _viewTypesAllowImageTypeOmission:NO] removeObjectForKey:MIMEType];
[[WebDataSource _repTypesAllowImageTypeOmission:NO] removeObjectForKey:MIMEType];
}
+ (void)_registerViewClass:(Class)viewClass representationClass:(Class)representationClass forURLScheme:(NSString *)URLScheme;
{
NSString *MIMEType = [self _generatedMIMETypeForURLScheme:URLScheme];
......@@ -908,6 +914,11 @@ - (void)_didFailProvisionalLoadWithError:(NSError *)error forFrame:(WebFrame *)f
[NSApp setWindowsNeedUpdate:YES];
}
- (void)_reloadForPluginChanges
{
[[self mainFrame] _reloadForPluginChanges];
}
@end
......
......@@ -206,6 +206,8 @@ Could be worth adding to the API.
*/
+ (void)_registerViewClass:(Class)viewClass representationClass:(Class)representationClass forURLScheme:(NSString *)URLScheme;
+ (void)_unregisterViewClassAndRepresentationClassForMIMEType:(NSString *)MIMEType;
+ (NSString *)_generatedMIMETypeForURLScheme:(NSString *)URLScheme;
+ (BOOL)_representationExistsForURLScheme:(NSString *)URLScheme;
/*!
......@@ -245,6 +247,8 @@ Could be worth adding to the API.
- (void)_willChangeValueForKey:(NSString *)key;
- (void)_didChangeValueForKey:(NSString *)key;
- (void)_reloadForPluginChanges;
@end