Bug 130484

Summary: [Webkit2] Add APIDownloadClient for download support.
Product: WebKit Reporter: Yongjun Zhang <yongjun_zhang>
Component: WebKit2Assignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: aestes, andersca, bunhere, cdumez, commit-queue, gyuyoung.kim, mitz, rakuco, sam, sergio
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch.
andersca: review+
[Webkit2] Add APIDownloadClient for download support. none

Description Yongjun Zhang 2014-03-19 16:15:39 PDT
For download support, we need to add API::DownloadClient and make the existing WebDownloadClient subclass to it.  This is to follow the new pattern for API classes.
Comment 1 Yongjun Zhang 2014-03-19 16:24:40 PDT
Created attachment 227230 [details]
Patch.
Comment 2 Andy Estes 2014-03-21 13:35:30 PDT
Created attachment 227483 [details]
[Webkit2] Add APIDownloadClient for download support.
Comment 3 WebKit Commit Bot 2014-03-21 13:36:16 PDT
Attachment 227483 [details] did not pass style-queue:


ERROR: Source/WebKit2/UIProcess/API/APIDownloadClient.h:64:  Missing space before {  [whitespace/braces] [5]
ERROR: Source/WebKit2/UIProcess/API/APIDownloadClient.h:64:  Missing space inside { }.  [whitespace/braces] [5]
Total errors found: 2 in 7 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 4 Andy Estes 2014-03-21 13:37:10 PDT
Somehow I missed Yongjun posting a patch, and I ended up writing an almost exact copy of it :(

Sorry.
Comment 5 Anders Carlsson 2014-03-21 13:58:55 PDT
Comment on attachment 227230 [details]
Patch.

Looks very good, but the WebContext constructor needs to initialize m_downloadClient, something like:

, m_downloadClient(std::make_unique<API::DownloadClient>())
Comment 6 Andy Estes 2014-03-21 14:15:22 PDT
Committed r166096: <http://trac.webkit.org/changeset/166096>