[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
andersca at apple.com
andersca at apple.com
Wed Dec 22 15:03:23 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 6c76be9928d756ac44d68ce0ff9c9495891ed9dd
Author: andersca at apple.com <andersca at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Oct 27 19:21:41 2010 +0000
Begin stubbing out the Download class
https://bugs.webkit.org/show_bug.cgi?id=48447
Reviewed by Adam Roben.
* WebKit2.pro:
* WebKit2.xcodeproj/project.pbxproj:
Add new files.
* WebKit2Prefix.h:
Include WebCore/EmptyProtocolDefinitions.h
* WebProcess/Downloads/Download.cpp: Added.
* WebProcess/Downloads/Download.h: Added.
* WebProcess/Downloads/DownloadManager.cpp:
(WebKit::DownloadManager::startDownload):
Create a Download object and start it.
* WebProcess/Downloads/mac/DownloadMac.mm: Added.
(WebKit::Download::start):
Create an NSURLDownload.
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::startDownload):
Ask the download manager to start downloading.
* win/WebKit2.vcproj:
* win/WebKit2Common.vsprops:
Add new files.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@70687 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit2/ChangeLog b/WebKit2/ChangeLog
index 91d4251..9d64e5f 100644
--- a/WebKit2/ChangeLog
+++ b/WebKit2/ChangeLog
@@ -1,3 +1,36 @@
+2010-10-27 Anders Carlsson <andersca at apple.com>
+
+ Reviewed by Adam Roben.
+
+ Begin stubbing out the Download class
+ https://bugs.webkit.org/show_bug.cgi?id=48447
+
+ * WebKit2.pro:
+ * WebKit2.xcodeproj/project.pbxproj:
+ Add new files.
+
+ * WebKit2Prefix.h:
+ Include WebCore/EmptyProtocolDefinitions.h
+
+ * WebProcess/Downloads/Download.cpp: Added.
+ * WebProcess/Downloads/Download.h: Added.
+
+ * WebProcess/Downloads/DownloadManager.cpp:
+ (WebKit::DownloadManager::startDownload):
+ Create a Download object and start it.
+
+ * WebProcess/Downloads/mac/DownloadMac.mm: Added.
+ (WebKit::Download::start):
+ Create an NSURLDownload.
+
+ * WebProcess/WebPage/WebFrame.cpp:
+ (WebKit::WebFrame::startDownload):
+ Ask the download manager to start downloading.
+
+ * win/WebKit2.vcproj:
+ * win/WebKit2Common.vsprops:
+ Add new files.
+
2010-10-27 Adam Roben <aroben at apple.com>
Don't allow setting NetscapePlugin::m_isWindowed after NPP_New has
diff --git a/WebKit2/WebKit2.pro b/WebKit2/WebKit2.pro
index c6acf79..245057d 100644
--- a/WebKit2/WebKit2.pro
+++ b/WebKit2/WebKit2.pro
@@ -284,6 +284,7 @@ HEADERS += \
UIProcess/WebUIClient.h \
UIProcess/qt/WebPopupMenuProxyQt.h \
WebProcess/Downloads/DownloadManager.h \
+ WebProcess/Downloads/Download.h \
WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.h \
WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.h \
WebProcess/InjectedBundle/API/c/WKBundleNodeHandlePrivate.h \
@@ -430,7 +431,9 @@ SOURCES += \
UIProcess/WebProcessManager.cpp \
UIProcess/WebProcessProxy.cpp \
UIProcess/WebUIClient.cpp \
+ WebProcess/Downloads/Download.cpp \
WebProcess/Downloads/DownloadManager.cpp \
+ WebProcess/Downloads/qt/DownloadQt.cpp \
WebProcess/InjectedBundle/API/c/WKBundle.cpp \
WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp \
WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.cpp \
diff --git a/WebKit2/WebKit2.xcodeproj/project.pbxproj b/WebKit2/WebKit2.xcodeproj/project.pbxproj
index c2073b5..1ab56ec 100644
--- a/WebKit2/WebKit2.xcodeproj/project.pbxproj
+++ b/WebKit2/WebKit2.xcodeproj/project.pbxproj
@@ -91,6 +91,9 @@
1A594ABB112A1FB6009DE7C7 /* WebUIClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A594AB9112A1FB6009DE7C7 /* WebUIClient.h */; };
1A61614F127798B5003ACD86 /* DownloadManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A61614D127798B5003ACD86 /* DownloadManager.cpp */; };
1A616150127798B5003ACD86 /* DownloadManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A61614E127798B5003ACD86 /* DownloadManager.h */; };
+ 1A6161D41278981C003ACD86 /* Download.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A6161D21278981C003ACD86 /* Download.h */; };
+ 1A6161D51278981C003ACD86 /* Download.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A6161D31278981C003ACD86 /* Download.cpp */; };
+ 1A61639612789B2F003ACD86 /* DownloadMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1A61639512789B2F003ACD86 /* DownloadMac.mm */; };
1A6F9F9011E13EFC00DB1371 /* CommandLine.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A6F9F8E11E13EFC00DB1371 /* CommandLine.h */; };
1A6F9FB711E1408500DB1371 /* CommandLineMac.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A6F9FB611E1408500DB1371 /* CommandLineMac.cpp */; };
1A6FA01E11E1526300DB1371 /* WebProcessMainMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1A6FA01D11E1526300DB1371 /* WebProcessMainMac.mm */; };
@@ -570,6 +573,9 @@
1A594AB9112A1FB6009DE7C7 /* WebUIClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebUIClient.h; sourceTree = "<group>"; };
1A61614D127798B5003ACD86 /* DownloadManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DownloadManager.cpp; sourceTree = "<group>"; };
1A61614E127798B5003ACD86 /* DownloadManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DownloadManager.h; sourceTree = "<group>"; };
+ 1A6161D21278981C003ACD86 /* Download.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Download.h; sourceTree = "<group>"; };
+ 1A6161D31278981C003ACD86 /* Download.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Download.cpp; sourceTree = "<group>"; };
+ 1A61639512789B2F003ACD86 /* DownloadMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = DownloadMac.mm; sourceTree = "<group>"; };
1A6F9F8E11E13EFC00DB1371 /* CommandLine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CommandLine.h; sourceTree = "<group>"; };
1A6F9FB611E1408500DB1371 /* CommandLineMac.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CommandLineMac.cpp; sourceTree = "<group>"; };
1A6FA01D11E1526300DB1371 /* WebProcessMainMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebProcessMainMac.mm; sourceTree = "<group>"; };
@@ -1113,12 +1119,23 @@
1A61614C127798B5003ACD86 /* Downloads */ = {
isa = PBXGroup;
children = (
+ 1A61639412789B2F003ACD86 /* mac */,
+ 1A6161D31278981C003ACD86 /* Download.cpp */,
+ 1A6161D21278981C003ACD86 /* Download.h */,
1A61614D127798B5003ACD86 /* DownloadManager.cpp */,
1A61614E127798B5003ACD86 /* DownloadManager.h */,
);
path = Downloads;
sourceTree = "<group>";
};
+ 1A61639412789B2F003ACD86 /* mac */ = {
+ isa = PBXGroup;
+ children = (
+ 1A61639512789B2F003ACD86 /* DownloadMac.mm */,
+ );
+ path = mac;
+ sourceTree = "<group>";
+ };
1A6FA01C11E1526300DB1371 /* mac */ = {
isa = PBXGroup;
children = (
@@ -2128,6 +2145,7 @@
1C8E28341275D73800BC7BD0 /* WebInspectorProxy.h in Headers */,
1C8E293912761E5B00BC7BD0 /* WKInspector.h in Headers */,
1A616150127798B5003ACD86 /* DownloadManager.h in Headers */,
+ 1A6161D41278981C003ACD86 /* Download.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -2442,6 +2460,8 @@
1C8E28351275D73800BC7BD0 /* WebInspectorProxy.cpp in Sources */,
1C8E293A12761E5B00BC7BD0 /* WKInspector.cpp in Sources */,
1A61614F127798B5003ACD86 /* DownloadManager.cpp in Sources */,
+ 1A6161D51278981C003ACD86 /* Download.cpp in Sources */,
+ 1A61639612789B2F003ACD86 /* DownloadMac.mm in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
diff --git a/WebKit2/WebKit2Prefix.h b/WebKit2/WebKit2Prefix.h
index 2e61ceb..13ee837 100644
--- a/WebKit2/WebKit2Prefix.h
+++ b/WebKit2/WebKit2Prefix.h
@@ -76,6 +76,8 @@ static const type& name() \
#define JS_EXPORTCLASS
#define WEBKIT_EXPORTDATA
+#include <WebCore/EmptyProtocolDefinitions.h>
+
#elif defined(WIN32) || defined(_WIN32)
#ifndef _WIN32_WINNT
diff --git a/WebKit2/WebProcess/Downloads/Download.cpp b/WebKit2/WebProcess/Downloads/Download.cpp
new file mode 100644
index 0000000..2e3d978
--- /dev/null
+++ b/WebKit2/WebProcess/Downloads/Download.cpp
@@ -0,0 +1,48 @@
+/*
+ * Copyright (C) 2010 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. 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 INC. 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.
+ */
+
+#include "Download.h"
+
+using namespace WebCore;
+
+namespace WebKit {
+
+PassOwnPtr<Download> Download::create(uint64_t downloadID, const ResourceRequest& request)
+{
+ return adoptPtr(new Download(downloadID, request));
+}
+
+Download::Download(uint64_t downloadID, const ResourceRequest& request)
+ : m_downloadID(downloadID)
+ , m_request(request)
+{
+ ASSERT(m_downloadID);
+}
+
+Download::~Download()
+{
+}
+
+} // namespace WebKit
diff --git a/WebKit2/WebProcess/Downloads/Download.h b/WebKit2/WebProcess/Downloads/Download.h
new file mode 100644
index 0000000..4e2bda5
--- /dev/null
+++ b/WebKit2/WebProcess/Downloads/Download.h
@@ -0,0 +1,69 @@
+/*
+ * Copyright (C) 2010 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. 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 INC. 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.
+ */
+
+#ifndef Download_h
+#define Download_h
+
+#if PLATFORM(MAC)
+#include <wtf/RetainPtr.h>
+#ifdef __OBJC__
+ at class NSURLDownload;
+ at class WKDownloadAsDelegate;
+#else
+class NSURLDownload;
+class WKDownloadAsDelegate;
+#endif
+#endif
+
+#include <WebCore/ResourceRequest.h>
+#include <wtf/Noncopyable.h>
+#include <wtf/PassOwnPtr.h>
+
+namespace WebKit {
+
+class Download {
+ WTF_MAKE_NONCOPYABLE(Download);
+
+public:
+ static PassOwnPtr<Download> create(uint64_t downloadID, const WebCore::ResourceRequest&);
+ ~Download();
+
+ void start();
+
+private:
+ Download(uint64_t downloadID, const WebCore::ResourceRequest&);
+
+ uint64_t m_downloadID;
+ WebCore::ResourceRequest m_request;
+
+#if PLATFORM(MAC)
+ RetainPtr<NSURLDownload> m_nsURLDownload;
+ RetainPtr<WKDownloadAsDelegate> m_delegate;
+#endif
+};
+
+} // namespace WebKit
+
+#endif // Download_h
diff --git a/WebKit2/WebProcess/Downloads/DownloadManager.cpp b/WebKit2/WebProcess/Downloads/DownloadManager.cpp
index 6f524a4..6bceb4d 100644
--- a/WebKit2/WebProcess/Downloads/DownloadManager.cpp
+++ b/WebKit2/WebProcess/Downloads/DownloadManager.cpp
@@ -25,8 +25,12 @@
#include "DownloadManager.h"
+#include "Download.h"
+#include "NotImplemented.h"
#include <wtf/StdLibExtras.h>
+using namespace WebCore;
+
namespace WebKit {
DownloadManager& DownloadManager::shared()
@@ -39,4 +43,10 @@ DownloadManager::DownloadManager()
{
}
+void DownloadManager::startDownload(uint64_t downloadID, const ResourceRequest& request)
+{
+ // FIXME: Implement.
+ notImplemented();
+}
+
} // namespace WebKit
diff --git a/WebKit2/WebProcess/Downloads/DownloadManager.h b/WebKit2/WebProcess/Downloads/DownloadManager.h
index 5c67256..ef3ccf5 100644
--- a/WebKit2/WebProcess/Downloads/DownloadManager.h
+++ b/WebKit2/WebProcess/Downloads/DownloadManager.h
@@ -28,6 +28,10 @@
#include <wtf/Noncopyable.h>
+namespace WebCore {
+ class ResourceRequest;
+}
+
namespace WebKit {
class DownloadManager {
@@ -36,6 +40,8 @@ class DownloadManager {
public:
static DownloadManager& shared();
+ void startDownload(uint64_t downloadID, const WebCore::ResourceRequest&);
+
private:
DownloadManager();
diff --git a/WebKit2/WebProcess/Downloads/cf/DownloadCFNet.cpp b/WebKit2/WebProcess/Downloads/cf/DownloadCFNet.cpp
new file mode 100644
index 0000000..e5e7dc5
--- /dev/null
+++ b/WebKit2/WebProcess/Downloads/cf/DownloadCFNet.cpp
@@ -0,0 +1,39 @@
+/*
+ * Copyright (C) 2010 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. 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 INC. 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.
+ */
+
+#include "Download.h"
+
+#include "NotImplemented.h"
+
+using namespace WebCore;
+
+namespace WebKit {
+
+void Download::start()
+{
+ notImplemented();
+}
+
+} // namespace WebKit
diff --git a/WebKit2/WebProcess/Downloads/mac/DownloadMac.mm b/WebKit2/WebProcess/Downloads/mac/DownloadMac.mm
new file mode 100644
index 0000000..e6111d3
--- /dev/null
+++ b/WebKit2/WebProcess/Downloads/mac/DownloadMac.mm
@@ -0,0 +1,156 @@
+/*
+ * Copyright (C) 2010 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. 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 INC. 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.
+ */
+
+#include "Download.h"
+
+#include "NotImplemented.h"
+
+ at interface WKDownloadAsDelegate : NSObject <NSURLConnectionDelegate> {
+ WebKit::Download* _download;
+}
+- (id)initWithDownload:(WebKit::Download*)download;
+- (void)invalidate;
+ at end
+
+
+using namespace WebCore;
+
+namespace WebKit {
+
+void Download::start()
+{
+ ASSERT(!m_nsURLDownload);
+ ASSERT(!m_delegate);
+
+ m_delegate.adoptNS([[WKDownloadAsDelegate alloc] initWithDownload:this]);
+ m_nsURLDownload.adoptNS([[NSURLDownload alloc] initWithRequest:m_request.nsURLRequest() delegate:m_delegate.get()]);
+}
+
+} // namespace WebKit
+
+ at implementation WKDownloadAsDelegate
+
+- (id)initWithDownload:(WebKit::Download*)download
+{
+ self = [super init];
+ if (!self)
+ return nil;
+
+ _download = download;
+ return self;
+}
+
+- (void)invalidate
+{
+ _download = 0;
+}
+
+- (void)downloadDidBegin:(NSURLDownload *)download
+{
+ // FIXME: Implement.
+ notImplemented();
+}
+
+- (NSURLRequest *)download:(NSURLDownload *)download willSendRequest:(NSURLRequest *)request redirectResponse:(NSURLResponse *)redirectResponse
+{
+ return request;
+}
+
+- (BOOL)download:(NSURLDownload *)connection canAuthenticateAgainstProtectionSpace:(NSURLProtectionSpace *)protectionSpace
+{
+ // FIXME: Implement.
+ notImplemented();
+ return NO;
+}
+
+- (void)download:(NSURLDownload *)download didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge
+{
+ // FIXME: Implement.
+ notImplemented();
+}
+
+- (void)download:(NSURLDownload *)download didCancelAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge
+{
+ // FIXME: Implement.
+ notImplemented();
+}
+
+- (BOOL)downloadShouldUseCredentialStorage:(NSURLDownload *)download
+{
+ // FIXME: Implement.
+ notImplemented();
+ return YES;
+}
+
+- (void)download:(NSURLDownload *)download didReceiveResponse:(NSURLResponse *)response;
+{
+ // FIXME: Implement.
+ notImplemented();
+}
+
+- (void)download:(NSURLDownload *)download willResumeWithResponse:(NSURLResponse *)response fromByte:(long long)startingByte
+{
+ // FIXME: Implement.
+ notImplemented();
+}
+
+- (void)download:(NSURLDownload *)download didReceiveDataOfLength:(NSUInteger)length
+{
+ // FIXME: Implement.
+ notImplemented();
+}
+
+- (BOOL)download:(NSURLDownload *)download shouldDecodeSourceDataOfMIMEType:(NSString *)encodingType
+{
+ // FIXME: Implement.
+ notImplemented();
+ return YES;
+}
+
+- (void)download:(NSURLDownload *)download decideDestinationWithSuggestedFilename:(NSString *)filename
+{
+ // FIXME: Implement.
+ notImplemented();
+}
+
+- (void)download:(NSURLDownload *)download didCreateDestination:(NSString *)path
+{
+ // FIXME: Implement.
+ notImplemented();
+}
+
+- (void)downloadDidFinish:(NSURLDownload *)download
+{
+ // FIXME: Implement.
+ notImplemented();
+}
+
+- (void)download:(NSURLDownload *)download didFailWithError:(NSError *)error
+{
+ // FIXME: Implement.
+ notImplemented();
+}
+
+ at end
diff --git a/WebKit2/WebProcess/Downloads/qt/DownloadQt.cpp b/WebKit2/WebProcess/Downloads/qt/DownloadQt.cpp
new file mode 100644
index 0000000..e5e7dc5
--- /dev/null
+++ b/WebKit2/WebProcess/Downloads/qt/DownloadQt.cpp
@@ -0,0 +1,39 @@
+/*
+ * Copyright (C) 2010 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. 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 INC. 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.
+ */
+
+#include "Download.h"
+
+#include "NotImplemented.h"
+
+using namespace WebCore;
+
+namespace WebKit {
+
+void Download::start()
+{
+ notImplemented();
+}
+
+} // namespace WebKit
diff --git a/WebKit2/WebProcess/WebPage/WebFrame.cpp b/WebKit2/WebProcess/WebPage/WebFrame.cpp
index c6f3905..da09ef3 100644
--- a/WebKit2/WebProcess/WebPage/WebFrame.cpp
+++ b/WebKit2/WebProcess/WebPage/WebFrame.cpp
@@ -25,6 +25,7 @@
#include "WebFrame.h"
+#include "DownloadManager.h"
#include "InjectedBundleNodeHandle.h"
#include "InjectedBundleRangeHandle.h"
#include "InjectedBundleScriptWorld.h"
@@ -205,10 +206,12 @@ void WebFrame::didReceivePolicyDecision(uint64_t listenerID, PolicyAction action
(m_coreFrame->loader()->policyChecker()->*function)(action);
}
-void WebFrame::startDownload(const WebCore::ResourceRequest&)
+void WebFrame::startDownload(const WebCore::ResourceRequest& request)
{
ASSERT(m_policyDownloadID);
+ DownloadManager::shared().startDownload(m_policyDownloadID, request);
+
m_policyDownloadID = 0;
}
diff --git a/WebKit2/win/WebKit2.vcproj b/WebKit2/win/WebKit2.vcproj
index 4181c48..7954a2c 100755
--- a/WebKit2/win/WebKit2.vcproj
+++ b/WebKit2/win/WebKit2.vcproj
@@ -1236,6 +1236,14 @@
Name="Downloads"
>
<File
+ RelativePath="..\WebProcess\Downloads\Download.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\WebProcess\Downloads\Download.h"
+ >
+ </File>
+ <File
RelativePath="..\WebProcess\Downloads\DownloadManager.cpp"
>
</File>
@@ -1243,6 +1251,14 @@
RelativePath="..\WebProcess\Downloads\DownloadManager.h"
>
</File>
+ <Filter
+ Name="cf"
+ >
+ <File
+ RelativePath="..\WebProcess\Downloads\cf\DownloadCFNet.cpp"
+ >
+ </File>
+ </Filter>
</Filter>
<Filter
Name="InjectedBundle"
diff --git a/WebKit2/win/WebKit2Common.vsprops b/WebKit2/win/WebKit2Common.vsprops
index d2714ae..5bbb024 100755
--- a/WebKit2/win/WebKit2Common.vsprops
+++ b/WebKit2/win/WebKit2Common.vsprops
@@ -6,7 +6,7 @@
>
<Tool
Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""$(ProjectDir)\..\Platform";"$(ProjectDir)\..\Platform\CoreIPC";"$(ProjectDir)\..\PluginProcess";"$(ProjectDir)\..\Shared";"$(ProjectDir)\..\Shared\win";"$(ProjectDir)\..\Shared\API\c";"$(ProjectDir)\..\Shared\API\c\cf";"$(ProjectDir)\..\Shared\API\c\win";"$(ProjectDir)\..\Shared\CoreIPCSupport";"$(ProjectDir)\..\UIProcess";"$(ProjectDir)\..\UIProcess\API\C";"$(ProjectDir)\..\UIProcess\API\C\win";"$(ProjectDir)\..\UIProcess\API\cpp";"$(ProjectDir)\..\UIProcess\API\win";"$(ProjectDir)\..\UIProcess\Launcher";"$(ProjectDir)\..\UIProcess\Plugins";"$(ProjectDir)\..\UIProcess\win";"$(ProjectDir)\..\WebProcess";"$(ProjectDir)\..\WebProcess\WebCoreSupport";"$(ProjectDir)\..\WebProcess\WebCoreSupport\win";"$(ProjectDir)\..\WebProcess\WebPage";"$(ProjectDir)\..\WebProcess\WebPage\win";"$(ProjectDir)\..\WebProcess\InjectedBundle";"$(ProjectDir)\..\WebProcess\InjectedBundle\API\c";"$(ProjectDir)\..\WebProcess\InjectedBundle\DOM";"$(ProjectDir)\..\WebProcess\InjectedBundle\win";"$(ProjectDir)\..\WebProcess\Plugins";"$(ProjectDir)\..\WebProcess\Plugins\Netscape";"$(ProjectDir)\..\WebProcess\win";"$(ProjectDir)\..\WebProcess\Downloads";"$(ProjectDir)\..\WebProcess\Downloads\win";"$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources";"$(WebKitOutputDir)\Include";"$(WebKitOutputDir)\Include\private";"$(WebKitLibrariesDir)\Include";"$(WebKitLibrariesDir)\Include\private";"$(WebKitLibrariesDir)\Include\pthreads";"$(WebKitOutputDir)\Include\JavaScriptCore";"$(WebKitOutputDir)\Include\private\JavaScriptCore";"$(WebKitLibrariesDir)\Include\JavaScriptCore";"$(WebKitLibrariesDir)\Include\private\JavaScriptCore";"$(WebKitOutputDir)\Include\WebCore\ForwardingHeaders";"$(WebKitLibrariesDir)\Include\WebCore\ForwardingHeaders""
+ AdditionalIncludeDirectories=""$(ProjectDir)\..\Platform";"$(ProjectDir)\..\Platform\CoreIPC";"$(ProjectDir)\..\PluginProcess";"$(ProjectDir)\..\Shared";"$(ProjectDir)\..\Shared\win";"$(ProjectDir)\..\Shared\API\c";"$(ProjectDir)\..\Shared\API\c\cf";"$(ProjectDir)\..\Shared\API\c\win";"$(ProjectDir)\..\Shared\CoreIPCSupport";"$(ProjectDir)\..\UIProcess";"$(ProjectDir)\..\UIProcess\API\C";"$(ProjectDir)\..\UIProcess\API\C\win";"$(ProjectDir)\..\UIProcess\API\cpp";"$(ProjectDir)\..\UIProcess\API\win";"$(ProjectDir)\..\UIProcess\Launcher";"$(ProjectDir)\..\UIProcess\Plugins";"$(ProjectDir)\..\UIProcess\win";"$(ProjectDir)\..\WebProcess";"$(ProjectDir)\..\WebProcess\WebCoreSupport";"$(ProjectDir)\..\WebProcess\WebCoreSupport\win";"$(ProjectDir)\..\WebProcess\WebPage";"$(ProjectDir)\..\WebProcess\WebPage\win";"$(ProjectDir)\..\WebProcess\InjectedBundle";"$(ProjectDir)\..\WebProcess\InjectedBundle\API\c";"$(ProjectDir)\..\WebProcess\InjectedBundle\DOM";"$(ProjectDir)\..\WebProcess\InjectedBundle\win";"$(ProjectDir)\..\WebProcess\Plugins";"$(ProjectDir)\..\WebProcess\Plugins\Netscape";"$(ProjectDir)\..\WebProcess\win";"$(ProjectDir)\..\WebProcess\Downloads";"$(ProjectDir)\..\WebProcess\Downloads\cf";"$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources";"$(WebKitOutputDir)\Include";"$(WebKitOutputDir)\Include\private";"$(WebKitLibrariesDir)\Include";"$(WebKitLibrariesDir)\Include\private";"$(WebKitLibrariesDir)\Include\pthreads";"$(WebKitOutputDir)\Include\JavaScriptCore";"$(WebKitOutputDir)\Include\private\JavaScriptCore";"$(WebKitLibrariesDir)\Include\JavaScriptCore";"$(WebKitLibrariesDir)\Include\private\JavaScriptCore";"$(WebKitOutputDir)\Include\WebCore\ForwardingHeaders";"$(WebKitLibrariesDir)\Include\WebCore\ForwardingHeaders""
PreprocessorDefinitions="_USRDLL;WEBKIT_EXPORTS;FRAMEWORK_NAME=WebKit;BUILDING_WEBKIT"
UsePrecompiledHeader="2"
PrecompiledHeaderThrough="WebKit2Prefix.h"
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list