<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[37983] trunk/WebKit/mac</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/37983">37983</a></dd>
<dt>Author</dt> <dd>andersca@apple.com</dd>
<dt>Date</dt> <dd>2008-10-29 15:53:09 -0700 (Wed, 29 Oct 2008)</dd>
</dl>

<h3>Log Message</h3>
<pre>2008-10-29  Anders Carlsson  &lt;andersca@apple.com&gt;

        Reviewed by Sam Weinig.

        Remove the WebBaseNetscapePluginStream Objective-C object.
        
        * Plugins/WebBaseNetscapePluginStream.h:
        (WebNetscapePluginStream::create):
        * Plugins/WebBaseNetscapePluginStream.mm:
        (WebNetscapePluginStream::WebNetscapePluginStream):
        * Plugins/WebBaseNetscapePluginView.mm:
        (-[WebBaseNetscapePluginView pluginView:receivedResponse:]):
        (-[WebBaseNetscapePluginView evaluateJavaScriptPluginRequest:]):
        (-[WebBaseNetscapePluginView loadRequest:inTarget:withNotifyData:sendNotification:]):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkWebKitmacChangeLog">trunk/WebKit/mac/ChangeLog</a></li>
<li><a href="#trunkWebKitmacPluginsWebBaseNetscapePluginStreamh">trunk/WebKit/mac/Plugins/WebBaseNetscapePluginStream.h</a></li>
<li><a href="#trunkWebKitmacPluginsWebBaseNetscapePluginStreammm">trunk/WebKit/mac/Plugins/WebBaseNetscapePluginStream.mm</a></li>
<li><a href="#trunkWebKitmacPluginsWebBaseNetscapePluginViewmm">trunk/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkWebKitmacChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/WebKit/mac/ChangeLog (37982 => 37983)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebKit/mac/ChangeLog        2008-10-29 22:39:18 UTC (rev 37982)
+++ trunk/WebKit/mac/ChangeLog        2008-10-29 22:53:09 UTC (rev 37983)
</span><span class="lines">@@ -1,3 +1,18 @@
</span><ins>+2008-10-29  Anders Carlsson  &lt;andersca@apple.com&gt;
+
+        Reviewed by Sam Weinig.
+
+        Remove the WebBaseNetscapePluginStream Objective-C object.
+        
+        * Plugins/WebBaseNetscapePluginStream.h:
+        (WebNetscapePluginStream::create):
+        * Plugins/WebBaseNetscapePluginStream.mm:
+        (WebNetscapePluginStream::WebNetscapePluginStream):
+        * Plugins/WebBaseNetscapePluginView.mm:
+        (-[WebBaseNetscapePluginView pluginView:receivedResponse:]):
+        (-[WebBaseNetscapePluginView evaluateJavaScriptPluginRequest:]):
+        (-[WebBaseNetscapePluginView loadRequest:inTarget:withNotifyData:sendNotification:]):
+
</ins><span class="cx"> 2008-10-29  Brady Eidson  &lt;beidson@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Reviewed by Sam Weinig
</span></span></pre></div>
<a id="trunkWebKitmacPluginsWebBaseNetscapePluginStreamh"></a>
<div class="modfile"><h4>Modified: trunk/WebKit/mac/Plugins/WebBaseNetscapePluginStream.h (37982 => 37983)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebKit/mac/Plugins/WebBaseNetscapePluginStream.h        2008-10-29 22:39:18 UTC (rev 37982)
+++ trunk/WebKit/mac/Plugins/WebBaseNetscapePluginStream.h        2008-10-29 22:53:09 UTC (rev 37983)
</span><span class="lines">@@ -45,19 +45,18 @@
</span><span class="cx"> 
</span><span class="cx"> @class WebBaseNetscapePluginView;
</span><span class="cx"> @class NSURLResponse;
</span><del>-@class WebBaseNetscapePluginStream;
</del><span class="cx"> 
</span><span class="cx"> class WebNetscapePluginStream : public RefCounted&lt;WebNetscapePluginStream&gt;
</span><span class="cx">                               , private WebCore::NetscapePlugInStreamLoaderClient
</span><span class="cx"> {
</span><span class="cx"> public:
</span><del>-    static PassRefPtr&lt;WebNetscapePluginStream&gt; create(WebBaseNetscapePluginStream *stream, NSURLRequest *request, NPP plugin, bool sendNotification, void* notifyData)
</del><ins>+    static PassRefPtr&lt;WebNetscapePluginStream&gt; create(NSURLRequest *request, NPP plugin, bool sendNotification, void* notifyData)
</ins><span class="cx">     {
</span><del>-        return adoptRef(new WebNetscapePluginStream(stream, request, plugin, sendNotification, notifyData));
</del><ins>+        return adoptRef(new WebNetscapePluginStream(request, plugin, sendNotification, notifyData));
</ins><span class="cx">     }
</span><del>-    static PassRefPtr&lt;WebNetscapePluginStream&gt; create(WebBaseNetscapePluginStream *stream, WebCore::FrameLoader* frameLoader)
</del><ins>+    static PassRefPtr&lt;WebNetscapePluginStream&gt; create(WebCore::FrameLoader* frameLoader)
</ins><span class="cx">     {
</span><del>-        return adoptRef(new WebNetscapePluginStream(stream, frameLoader));
</del><ins>+        return adoptRef(new WebNetscapePluginStream(frameLoader));
</ins><span class="cx">     }
</span><span class="cx">     virtual ~WebNetscapePluginStream();
</span><span class="cx"> 
</span><span class="lines">@@ -78,11 +77,13 @@
</span><span class="cx">     
</span><span class="cx">     void startStreamWithResponse(NSURLResponse *response);
</span><span class="cx">     
</span><del>-    // FIXME: These should all be private once WebBaseNetscapePluginStream is history...
-public:
</del><ins>+    void didReceiveData(WebCore::NetscapePlugInStreamLoader*, const char* bytes, int length);
+    void destroyStreamWithError(NSError *);
+    void didFinishLoading(WebCore::NetscapePlugInStreamLoader*);
+
+private:
</ins><span class="cx">     void destroyStream();
</span><span class="cx">     void cancelLoadWithError(NSError *);
</span><del>-    void destroyStreamWithError(NSError *);
</del><span class="cx">     void destroyStreamWithReason(NPReason);
</span><span class="cx">     void deliverDataToFile(NSData *data);
</span><span class="cx">     void deliverData();
</span><span class="lines">@@ -93,9 +94,7 @@
</span><span class="cx"> 
</span><span class="cx">     // NetscapePlugInStreamLoaderClient methods.
</span><span class="cx">     void didReceiveResponse(WebCore::NetscapePlugInStreamLoader*, const WebCore::ResourceResponse&amp;);
</span><del>-    void didReceiveData(WebCore::NetscapePlugInStreamLoader*, const char* bytes, int length);
</del><span class="cx">     void didFail(WebCore::NetscapePlugInStreamLoader*, const WebCore::ResourceError&amp;);
</span><del>-    void didFinishLoading(WebCore::NetscapePlugInStreamLoader*);
</del><span class="cx">     bool wantsAllStreams() const;
</span><span class="cx"> 
</span><span class="cx">     RetainPtr&lt;NSMutableData&gt; m_deliveryData;
</span><span class="lines">@@ -125,27 +124,8 @@
</span><span class="cx">     void deliverDataTimerFired(WebCore::Timer&lt;WebNetscapePluginStream&gt;* timer);
</span><span class="cx">     WebCore::Timer&lt;WebNetscapePluginStream&gt; m_deliverDataTimer;
</span><span class="cx">     
</span><del>-    // FIXME: Remove this once it's not needed anymore.
-    WebBaseNetscapePluginStream *m_pluginStream;
-    
-private:
-    WebNetscapePluginStream(WebBaseNetscapePluginStream *, WebCore::FrameLoader*);
-    WebNetscapePluginStream(WebBaseNetscapePluginStream *, NSURLRequest *, NPP, bool sendNotification, void* notifyData);
</del><ins>+    WebNetscapePluginStream(WebCore::FrameLoader*);
+    WebNetscapePluginStream(NSURLRequest *, NPP, bool sendNotification, void* notifyData);
</ins><span class="cx"> };
</span><span class="cx"> 
</span><del>-@interface WebBaseNetscapePluginStream : NSObject
-{     
-    RefPtr&lt;WebNetscapePluginStream&gt; _impl;
-}
-
-- (WebNetscapePluginStream *)impl;
-
-- (id)initWithFrameLoader:(WebCore::FrameLoader *)frameLoader;
-
-- (id)initWithRequest:(NSURLRequest *)theRequest
-               plugin:(NPP)thePlugin
-           notifyData:(void *)theNotifyData
-     sendNotification:(BOOL)sendNotification;
-
-@end
</del><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkWebKitmacPluginsWebBaseNetscapePluginStreammm"></a>
<div class="modfile"><h4>Modified: trunk/WebKit/mac/Plugins/WebBaseNetscapePluginStream.mm (37982 => 37983)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebKit/mac/Plugins/WebBaseNetscapePluginStream.mm        2008-10-29 22:39:18 UTC (rev 37982)
+++ trunk/WebKit/mac/Plugins/WebBaseNetscapePluginStream.mm        2008-10-29 22:53:09 UTC (rev 37983)
</span><span class="lines">@@ -60,15 +60,6 @@
</span><span class="cx">     return staticStreams;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-@implementation WebBaseNetscapePluginStream
-
-#ifndef BUILDING_ON_TIGER
-+ (void)initialize
-{
-    WebCoreObjCFinalizeOnMainThread(self);
-}
-#endif
-
</del><span class="cx"> NPP WebNetscapePluginStream::ownerForStream(NPStream *stream)
</span><span class="cx"> {
</span><span class="cx">     return streams().get(stream);
</span><span class="lines">@@ -107,21 +98,7 @@
</span><span class="cx">     return pluginCancelledConnectionError();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-- (NSError *)errorForReason:(NPReason)theReason
-{
-    return _impl-&gt;errorForReason(theReason);
-}
-
-- (id)initWithFrameLoader:(FrameLoader *)frameLoader
-{
-    [super init];
-    
-    _impl = WebNetscapePluginStream::create(self, frameLoader);
-    
-    return self;
-}
-
-WebNetscapePluginStream::WebNetscapePluginStream(WebBaseNetscapePluginStream *stream, WebCore::FrameLoader* frameLoader)
</del><ins>+WebNetscapePluginStream::WebNetscapePluginStream(FrameLoader* frameLoader)
</ins><span class="cx">     : m_plugin(0)
</span><span class="cx">     , m_transferMode(0)
</span><span class="cx">     , m_offset(0)
</span><span class="lines">@@ -137,12 +114,11 @@
</span><span class="cx">     , m_request(0)
</span><span class="cx">     , m_pluginFuncs(0)
</span><span class="cx">     , m_deliverDataTimer(this, &amp;WebNetscapePluginStream::deliverDataTimerFired)
</span><del>-    , m_pluginStream(stream)
</del><span class="cx"> {
</span><span class="cx">     memset(&amp;m_stream, 0, sizeof(NPStream));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-WebNetscapePluginStream::WebNetscapePluginStream(WebBaseNetscapePluginStream *stream, NSURLRequest *request, NPP plugin, bool sendNotification, void* notifyData)
</del><ins>+WebNetscapePluginStream::WebNetscapePluginStream(NSURLRequest *request, NPP plugin, bool sendNotification, void* notifyData)
</ins><span class="cx">     : m_requestURL([request URL])
</span><span class="cx">     , m_plugin(0)
</span><span class="cx">     , m_transferMode(0)
</span><span class="lines">@@ -159,7 +135,6 @@
</span><span class="cx">     , m_request([request mutableCopy])
</span><span class="cx">     , m_pluginFuncs(0)
</span><span class="cx">     , m_deliverDataTimer(this, &amp;WebNetscapePluginStream::deliverDataTimerFired)
</span><del>-    , m_pluginStream(stream)
</del><span class="cx"> {
</span><span class="cx">     memset(&amp;m_stream, 0, sizeof(NPStream));
</span><span class="cx"> 
</span><span class="lines">@@ -182,16 +157,6 @@
</span><span class="cx">     m_loader-&gt;setShouldBufferData(false);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-- (id)initWithRequest:(NSURLRequest *)theRequest
-               plugin:(NPP)thePlugin
-           notifyData:(void *)theNotifyData 
-     sendNotification:(BOOL)flag
-{   
-    _impl = WebNetscapePluginStream::create(self, theRequest, thePlugin, flag, theNotifyData);
-    
-    return self;
-}
-
</del><span class="cx"> WebNetscapePluginStream::~WebNetscapePluginStream()
</span><span class="cx"> {
</span><span class="cx">     ASSERT(!m_plugin);
</span><span class="lines">@@ -212,21 +177,6 @@
</span><span class="cx">     streams().remove(&amp;m_stream);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-- (void)dealloc
-{
-    ASSERT(_impl);
-    
-    [super dealloc];
-}
-
-- (void)finalize
-{
-    ASSERT_MAIN_THREAD();
-    ASSERT(_impl);
-        
-    [super finalize];
-}
-
</del><span class="cx"> void WebNetscapePluginStream::setPlugin(NPP plugin)
</span><span class="cx"> {
</span><span class="cx">     if (plugin) {
</span><span class="lines">@@ -662,13 +612,6 @@
</span><span class="cx">     [data release];
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-- (WebNetscapePluginStream *)impl
-{
-    return _impl.get();
-}
-
-@end
-
</del><span class="cx"> static NSString *CarbonPathFromPOSIXPath(NSString *posixPath)
</span><span class="cx"> {
</span><span class="cx">     // Doesn't add a trailing colon for directories; this is a problem for paths to a volume,
</span></span></pre></div>
<a id="trunkWebKitmacPluginsWebBaseNetscapePluginViewmm"></a>
<div class="modfile"><h4>Modified: trunk/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm (37982 => 37983)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm        2008-10-29 22:39:18 UTC (rev 37982)
+++ trunk/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm        2008-10-29 22:53:09 UTC (rev 37983)
</span><span class="lines">@@ -1756,7 +1756,7 @@
</span><span class="cx">     ASSERT(_loadManually);
</span><span class="cx">     ASSERT(!_manualStream);
</span><span class="cx"> 
</span><del>-    _manualStream = WebNetscapePluginStream::create(0, core([self webFrame])-&gt;loader());
</del><ins>+    _manualStream = WebNetscapePluginStream::create(core([self webFrame])-&gt;loader());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> - (void)pluginView:(NSView *)pluginView receivedData:(NSData *)data
</span><span class="lines">@@ -2020,7 +2020,7 @@
</span><span class="cx">         // Don't call NPP_NewStream and other stream methods if there is no JS result to deliver. This is what Mozilla does.
</span><span class="cx">         NSData *JSData = [result dataUsingEncoding:NSUTF8StringEncoding];
</span><span class="cx">         
</span><del>-        RefPtr&lt;WebNetscapePluginStream&gt; stream = WebNetscapePluginStream::create(0, [NSURLRequest requestWithURL:URL], plugin, [JSPluginRequest sendNotification], [JSPluginRequest notifyData]);
</del><ins>+        RefPtr&lt;WebNetscapePluginStream&gt; stream = WebNetscapePluginStream::create([NSURLRequest requestWithURL:URL], plugin, [JSPluginRequest sendNotification], [JSPluginRequest notifyData]);
</ins><span class="cx">         
</span><span class="cx">         RetainPtr&lt;NSURLResponse&gt; response(AdoptNS, [[NSURLResponse alloc] initWithURL:URL 
</span><span class="cx">                                                                              MIMEType:@&quot;text/plain&quot; 
</span><span class="lines">@@ -2181,7 +2181,7 @@
</span><span class="cx">         [self performSelector:@selector(loadPluginRequest:) withObject:pluginRequest afterDelay:0];
</span><span class="cx">         [pluginRequest release];
</span><span class="cx">     } else {
</span><del>-        RefPtr&lt;WebNetscapePluginStream&gt; stream = WebNetscapePluginStream::create(0, request, plugin, sendNotification, notifyData);
</del><ins>+        RefPtr&lt;WebNetscapePluginStream&gt; stream = WebNetscapePluginStream::create(request, plugin, sendNotification, notifyData);
</ins><span class="cx"> 
</span><span class="cx">         streams.add(stream.get());
</span><span class="cx">         stream-&gt;start();
</span></span></pre>
</div>
</div>

</body>
</html>