Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
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. Canonical link: https://commits.webkit.org/61208@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@70687 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Anders Carlsson
committed
Oct 27, 2010
1 parent
dda1f97
commit 7bb7abc698c1026c64e70c3e647e4b07359480fd
Showing
14 changed files
with
446 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -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__ | ||
@class NSURLDownload; | ||
@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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -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 |
Oops, something went wrong.