Commit e2b89383 authored by andersca@apple.com's avatar andersca@apple.com
Browse files

2008-10-29 Anders Carlsson <andersca@apple.com>

        Reviewed by Sam Weinig.

        Remove WebNetscapePluginEmbeddedView, it adds nothing extra now. 
        
        Remove WebNetscapePlugInStreamLoaderClient since WebNetscapePluginStream is the client now.
        
        * Plugins/WebBaseNetscapePluginStream.h:
        * Plugins/WebBaseNetscapePluginStream.mm:
        * Plugins/WebBaseNetscapePluginView.h:
        * Plugins/WebKitPluginContainerView.h:
        * Plugins/WebNetscapePluginEmbeddedView.h: Removed.
        * Plugins/WebNetscapePluginEmbeddedView.mm: Removed.
        * Plugins/WebNetscapePluginEventHandler.h:
        * WebCoreSupport/WebFrameLoaderClient.mm:
        (NetscapePluginWidget::NetscapePluginWidget):
        (NetscapePluginWidget::handleEvent):
        (WebFrameLoaderClient::createPlugin):
        * WebCoreSupport/WebNetscapePlugInStreamLoaderClient.h: Removed.
        * WebCoreSupport/WebNetscapePlugInStreamLoaderClient.mm: Removed.
        * WebView/WebHTMLView.mm:
        (-[NSArray _web_makePluginViewsPerformSelector:withObject:]):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37984 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent cd46164f
2008-10-29 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Remove WebNetscapePluginEmbeddedView, it adds nothing extra now.
Remove WebNetscapePlugInStreamLoaderClient since WebNetscapePluginStream is the client now.
* Plugins/WebBaseNetscapePluginStream.h:
* Plugins/WebBaseNetscapePluginStream.mm:
* Plugins/WebBaseNetscapePluginView.h:
* Plugins/WebKitPluginContainerView.h:
* Plugins/WebNetscapePluginEmbeddedView.h: Removed.
* Plugins/WebNetscapePluginEmbeddedView.mm: Removed.
* Plugins/WebNetscapePluginEventHandler.h:
* WebCoreSupport/WebFrameLoaderClient.mm:
(NetscapePluginWidget::NetscapePluginWidget):
(NetscapePluginWidget::handleEvent):
(WebFrameLoaderClient::createPlugin):
* WebCoreSupport/WebNetscapePlugInStreamLoaderClient.h: Removed.
* WebCoreSupport/WebNetscapePlugInStreamLoaderClient.mm: Removed.
* WebView/WebHTMLView.mm:
(-[NSArray _web_makePluginViewsPerformSelector:withObject:]):
2008-10-29 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
......
......@@ -38,6 +38,8 @@
#import <wtf/RefPtr.h>
#import <wtf/RetainPtr.h>
#import "WebBaseNetscapePluginView.h"
namespace WebCore {
class FrameLoader;
class NetscapePlugInStreamLoader;
......
......@@ -37,7 +37,6 @@
#import "WebNSURLExtras.h"
#import "WebNSURLRequestExtras.h"
#import "WebNetscapePluginPackage.h"
#import "WebNetscapePlugInStreamLoaderClient.h"
#import <Foundation/NSURLResponse.h>
#import <kjs/JSLock.h>
#import <WebCore/DocumentLoader.h>
......
......@@ -55,6 +55,11 @@ typedef union PluginPort {
typedef struct _NPPluginTextInputFuncs NPPluginTextInputFuncs;
// Because the Adobe 7.x Acrobat plug-in has a hard coded check for a view named
// "WebNetscapePluginDocumentView", this class must retain the old name in order
// for the plug-in to function correctly. (rdar://problem/4699455)
#define WebBaseNetscapePluginView WebNetscapePluginDocumentView
@interface WebBaseNetscapePluginView : NSView <WebPluginManualLoader, NSTextInput>
{
WebNetscapePluginPackage *pluginPackage;
......
......@@ -31,7 +31,7 @@
@class DOMElement;
@interface WebKitPluginContainerView : NSView
{
{
DOMElement *_element;
}
......
/*
* Copyright (C) 2005 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
* its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#if ENABLE(NETSCAPE_PLUGIN_API)
#import <WebKit/WebBaseNetscapePluginView.h>
// Because the Adobe 7.x Acrobat plug-in has a hard coded check for a view named
// "WebNetscapePluginDocumentView", this class must retain the old name in order
// for the plug-in to function correctly. (rdar://problem/4699455)
#define WebNetscapePluginEmbeddedView WebNetscapePluginDocumentView
@interface WebNetscapePluginEmbeddedView : WebBaseNetscapePluginView
{
}
@end
#endif
/*
* Copyright (C) 2005 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
* its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#if ENABLE(NETSCAPE_PLUGIN_API)
#import "WebNetscapePluginEmbeddedView.h"
#import "WebBaseNetscapePluginViewPrivate.h"
#import "WebDataSource.h"
#import "WebFrame.h"
#import "WebFrameInternal.h"
#import "WebFrameView.h"
#import "WebNSURLExtras.h"
#import "WebNSURLRequestExtras.h"
#import "WebNSViewExtras.h"
#import "WebNetscapePluginPackage.h"
#import "WebBaseNetscapePluginStream.h"
#import "WebView.h"
#import <WebCore/Frame.h>
#import <WebCore/FrameLoader.h>
#import <wtf/Assertions.h>
@implementation WebNetscapePluginEmbeddedView
@end
#endif
......@@ -26,6 +26,8 @@
#ifndef WebNetscapePluginEventHandler_h
#define WebNetscapePluginEventHandler_h
#import "WebBaseNetscapePluginView.h"
#if ENABLE(NETSCAPE_PLUGIN_API)
@class NSEvent;
......
......@@ -56,7 +56,7 @@
#import "WebKitLogging.h"
#import "WebKitNSStringExtras.h"
#import "WebNSURLExtras.h"
#import "WebNetscapePluginEmbeddedView.h"
#import "WebBaseNetscapePluginView.h"
#import "WebNetscapePluginPackage.h"
#import "WebNullPluginView.h"
#import "WebPanelAuthenticationHandler.h"
......@@ -1259,7 +1259,7 @@ public:
class NetscapePluginWidget : public PluginWidget {
public:
NetscapePluginWidget(WebNetscapePluginEmbeddedView *view)
NetscapePluginWidget(WebBaseNetscapePluginView *view)
: PluginWidget(view)
{
}
......@@ -1272,7 +1272,7 @@ public:
NSEvent* event = frame->eventHandler()->currentNSEvent();
if ([event type] == NSMouseMoved)
[(WebNetscapePluginEmbeddedView *)platformWidget() handleMouseMoved:event];
[(WebBaseNetscapePluginView *)platformWidget() handleMouseMoved:event];
}
};
......@@ -1341,7 +1341,7 @@ Widget* WebFrameLoaderClient::createPlugin(const IntSize& size, Element* element
#if ENABLE(NETSCAPE_PLUGIN_API)
else if ([pluginPackage isKindOfClass:[WebNetscapePluginPackage class]]) {
WebNetscapePluginEmbeddedView *embeddedView = [[[WebNetscapePluginEmbeddedView alloc]
WebBaseNetscapePluginView *embeddedView = [[[WebBaseNetscapePluginView alloc]
initWithFrame:NSMakeRect(0, 0, size.width(), size.height())
pluginPackage:(WebNetscapePluginPackage *)pluginPackage
URL:URL
......@@ -1390,8 +1390,8 @@ void WebFrameLoaderClient::redirectDataToPlugin(Widget* pluginWidget)
NSView *pluginView = pluginWidget->platformWidget();
#if ENABLE(NETSCAPE_PLUGIN_API)
if ([pluginView isKindOfClass:[WebNetscapePluginEmbeddedView class]])
[representation _redirectDataToManualLoader:(WebNetscapePluginEmbeddedView *)pluginView forPluginView:pluginView];
if ([pluginView isKindOfClass:[WebBaseNetscapePluginView class]])
[representation _redirectDataToManualLoader:(WebBaseNetscapePluginView *)pluginView forPluginView:pluginView];
else {
#else
{
......@@ -1434,7 +1434,7 @@ Widget* WebFrameLoaderClient::createJavaAppletWidget(const IntSize& size, Elemen
}
#if ENABLE(NETSCAPE_PLUGIN_API)
else if ([pluginPackage isKindOfClass:[WebNetscapePluginPackage class]]) {
view = [[[WebNetscapePluginEmbeddedView alloc] initWithFrame:NSMakeRect(0, 0, size.width(), size.height())
view = [[[WebBaseNetscapePluginView alloc] initWithFrame:NSMakeRect(0, 0, size.width(), size.height())
pluginPackage:(WebNetscapePluginPackage *)pluginPackage
URL:nil
baseURL:baseURL
......
/*
* Copyright (C) 2007 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
* its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#import <WebKit/WebPlugInStreamLoaderDelegate.h>
#import <WebCore/NetscapePlugInStreamLoader.h>
#import <wtf/RetainPtr.h>
namespace WebCore {
class NetscapePlugInStreamLoader;
class ResourceResponse;
};
typedef id <WebPlugInStreamLoaderDelegate> PlugInStreamLoaderDelegate;
class WebNetscapePlugInStreamLoaderClient : public WebCore::NetscapePlugInStreamLoaderClient {
public:
WebNetscapePlugInStreamLoaderClient(PlugInStreamLoaderDelegate delegate) : m_stream(delegate) { }
virtual void didReceiveResponse(WebCore::NetscapePlugInStreamLoader*, const WebCore::ResourceResponse&);
virtual void didReceiveData(WebCore::NetscapePlugInStreamLoader*, const char*, int);
virtual void didFail(WebCore::NetscapePlugInStreamLoader*, const WebCore::ResourceError&);
virtual void didFinishLoading(WebCore::NetscapePlugInStreamLoader*);
virtual bool wantsAllStreams() const;
private:
RetainPtr<PlugInStreamLoaderDelegate> m_stream;
};
/*
* Copyright (C) 2007 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
* its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#import <WebKit/WebNetscapePlugInStreamLoaderClient.h>
#import <WebCore/NetscapePlugInStreamLoader.h>
#import <WebCore/ResourceResponse.h>
using namespace WebCore;
void WebNetscapePlugInStreamLoaderClient::didReceiveResponse(NetscapePlugInStreamLoader*, const ResourceResponse& theResponse)
{
[m_stream.get() startStreamWithResponse:theResponse.nsURLResponse()];
}
void WebNetscapePlugInStreamLoaderClient::didReceiveData(NetscapePlugInStreamLoader*, const char* data, int length)
{
NSData *nsData = [[NSData alloc] initWithBytesNoCopy:(void*)data length:length freeWhenDone:NO];
[m_stream.get() receivedData:nsData];
[nsData release];
}
void WebNetscapePlugInStreamLoaderClient::didFail(NetscapePlugInStreamLoader*, const ResourceError& error)
{
[m_stream.get() destroyStreamWithError:error];
m_stream = 0;
}
void WebNetscapePlugInStreamLoaderClient::didFinishLoading(NetscapePlugInStreamLoader*)
{
[m_stream.get() finishedLoading];
m_stream = 0;
}
bool WebNetscapePlugInStreamLoaderClient::wantsAllStreams() const
{
return [m_stream.get() wantsAllStreams];
}
......@@ -61,7 +61,6 @@
#import "WebNSPrintOperationExtras.h"
#import "WebNSURLExtras.h"
#import "WebNSViewExtras.h"
#import "WebNetscapePluginEmbeddedView.h"
#import "WebPluginController.h"
#import "WebPreferences.h"
#import "WebPreferencesPrivate.h"
......@@ -4543,9 +4542,9 @@ static BOOL writingDirectionKeyBindingsEnabled()
{
#if ENABLE(NETSCAPE_PLUGIN_API)
NSEnumerator *enumerator = [self objectEnumerator];
WebNetscapePluginEmbeddedView *view;
WebBaseNetscapePluginView *view;
while ((view = [enumerator nextObject]) != nil)
if ([view isKindOfClass:[WebNetscapePluginEmbeddedView class]])
if ([view isKindOfClass:[WebBaseNetscapePluginView class]])
[view performSelector:selector withObject:object];
#endif
}
......
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