Changeset 107180 in webkit


Ignore:
Timestamp:
Feb 8, 2012 10:12:47 PM (12 years ago)
Author:
commit-queue@webkit.org
Message:

[WK2][EFL] creating dummy class derived from ResourceHandleClient for Efl download module.
https://bugs.webkit.org/show_bug.cgi?id=76171

Patch by Keunsoon Lee <keunsoon.lee@samsung.com> on 2012-02-08
Reviewed by Andreas Kling.

FileDownloaderEfl is a practical class to operate file download.
It communicates with Download class to start download
and to notify downloading states to user(e.g. client application).
Besides FileDownloaderEfl derives from ResourceHandleClient
and receives chunked data from ResourceHandle directly
or redirects data flow which is started from MainResourceLoader
by mean of exchanging ResourceHandle's existing client for FileDownloaderEfl.

This patch has only dummy functions to make easy to review.
Working patch will be uploaded on another bug thread.

  • PlatformEfl.cmake: added new file to compile.
  • WebProcess/Downloads/Download.h: added FileDownloaderEfl's instance as a form of OwnPtr<FileDownloaderEfl>.

(WebKit):
(Download):

  • WebProcess/Downloads/efl/DownloadEfl.cpp:

(WebKit::Download::start): calling to FileDownloaderEfl::start() to start download for passing ResourceRequest.

  • WebProcess/Downloads/efl/FileDownloaderEfl.cpp: Added. a practical class to operate file download.

(WebKit):
(WebKit::FileDownloaderEfl::create): create function, which returns PassOwnPtr<FileDownloaderEfl>.
(WebKit::FileDownloaderEfl::FileDownloaderEfl): constructor, which receives Download* as a parameter.
(WebKit::FileDownloaderEfl::~FileDownloaderEfl): deconstructor.
(WebKit::FileDownloaderEfl::start): a function to start downloading for passed ResourceRequest.
It does nothing for now, but shows how Download class can call FileDownloaderEfl's function.
(WebKit::FileDownloaderEfl::didReceiveResponse): virtual function for ResourceHandleClient.
It will receive response header information from ResourceHandle.
(WebKit::FileDownloaderEfl::didReceiveData): virtual function for ResourceHandleClient.
It will receive chunk data from ResourceHandle.
(WebKit::FileDownloaderEfl::didFinishLoading): virtual function for ResourceHandleClient.
It will be notified loading is finished from ResourceHandle.
(WebKit::FileDownloaderEfl::didFail): virtual function for ResourceHandleClient.
It will be notified loading is fail with ResourceError from ResourceHandle.
(WebKit::FileDownloaderEfl::shouldUseCredentialStorage): virtual function for ResourceHandleClient.
It returns whether to use credential storage or not.
(WebKit::FileDownloaderEfl::didReceiveAuthenticationChallenge): virtual function for ResourceHandleClient.
It will receive AuthenticationChallenge.
(WebKit::FileDownloaderEfl::didCancelAuthenticationChallenge): virtual function for ResourceHandleClient.
It will be notified AuthenticationChallenge is canceled.
(WebKit::FileDownloaderEfl::receivedCancellation): virtual function for ResourceHandleClient.

  • WebProcess/Downloads/efl/FileDownloaderEfl.h: Added.

(WebCore):
(WebKit):
(FileDownloaderEfl):

Location:
trunk/Source/WebKit2
Files:
1 added
4 edited
1 copied

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r107176 r107180  
     12012-02-08  Keunsoon Lee  <keunsoon.lee@samsung.com>
     2
     3        [WK2][EFL] creating dummy class derived from ResourceHandleClient for Efl download module.
     4        https://bugs.webkit.org/show_bug.cgi?id=76171
     5
     6        Reviewed by Andreas Kling.
     7
     8        FileDownloaderEfl is a practical class to operate file download.
     9        It communicates with Download class to start download
     10        and to notify downloading states to user(e.g. client application).
     11        Besides FileDownloaderEfl derives from ResourceHandleClient
     12        and receives chunked data from ResourceHandle directly
     13        or redirects data flow which is started from MainResourceLoader
     14        by mean of exchanging ResourceHandle's existing client for FileDownloaderEfl.
     15
     16        This patch has only dummy functions to make easy to review.
     17        Working patch will be uploaded on another bug thread.
     18
     19        * PlatformEfl.cmake: added new file to compile.
     20        * WebProcess/Downloads/Download.h: added FileDownloaderEfl's instance as a form of OwnPtr<FileDownloaderEfl>.
     21        (WebKit):
     22        (Download):
     23        * WebProcess/Downloads/efl/DownloadEfl.cpp:
     24        (WebKit::Download::start): calling to FileDownloaderEfl::start() to start download for passing ResourceRequest.
     25        * WebProcess/Downloads/efl/FileDownloaderEfl.cpp: Added. a practical class to operate file download.
     26        (WebKit):
     27        (WebKit::FileDownloaderEfl::create): create function, which returns PassOwnPtr<FileDownloaderEfl>.
     28        (WebKit::FileDownloaderEfl::FileDownloaderEfl): constructor, which receives Download* as a parameter.
     29        (WebKit::FileDownloaderEfl::~FileDownloaderEfl): deconstructor.
     30        (WebKit::FileDownloaderEfl::start): a function to start downloading for passed ResourceRequest.
     31        It does nothing for now, but shows how Download class can call FileDownloaderEfl's function.
     32        (WebKit::FileDownloaderEfl::didReceiveResponse): virtual function for ResourceHandleClient.
     33        It will receive response header information from ResourceHandle.
     34        (WebKit::FileDownloaderEfl::didReceiveData): virtual function for ResourceHandleClient.
     35        It will receive chunk data from ResourceHandle.
     36        (WebKit::FileDownloaderEfl::didFinishLoading): virtual function for ResourceHandleClient.
     37        It will be notified loading is finished from ResourceHandle.
     38        (WebKit::FileDownloaderEfl::didFail): virtual function for ResourceHandleClient.
     39        It will be notified loading is fail with ResourceError from ResourceHandle.
     40        (WebKit::FileDownloaderEfl::shouldUseCredentialStorage): virtual function for ResourceHandleClient.
     41        It returns whether to use credential storage or not.
     42        (WebKit::FileDownloaderEfl::didReceiveAuthenticationChallenge): virtual function for ResourceHandleClient.
     43        It will receive AuthenticationChallenge.
     44        (WebKit::FileDownloaderEfl::didCancelAuthenticationChallenge): virtual function for ResourceHandleClient.
     45        It will be notified AuthenticationChallenge is canceled.
     46        (WebKit::FileDownloaderEfl::receivedCancellation): virtual function for ResourceHandleClient.
     47        * WebProcess/Downloads/efl/FileDownloaderEfl.h: Added.
     48        (WebCore):
     49        (WebKit):
     50        (FileDownloaderEfl):
     51
    1522012-02-07  MORITA Hajime  <morrita@google.com>
    253
  • trunk/Source/WebKit2/PlatformEfl.cmake

    r104122 r107180  
    4646
    4747    WebProcess/Downloads/efl/DownloadEfl.cpp
     48    WebProcess/Downloads/efl/FileDownloaderEfl.cpp
    4849
    4950    WebProcess/efl/WebProcessEfl.cpp
     
    6667    "${WEBKIT2_DIR}/Shared/efl"
    6768    "${WEBKIT2_DIR}/UIProcess/API/efl/"
     69    "${WEBKIT2_DIR}/WebProcess/Downloads/efl"
    6870    "${WEBKIT2_DIR}/WebProcess/efl"
    6971    "${WEBKIT2_DIR}/WebProcess/WebCoreSupport/efl"
  • trunk/Source/WebKit2/WebProcess/Downloads/Download.h

    r101609 r107180  
    4848#endif
    4949
     50#if PLATFORM(EFL)
     51#include <FileDownloaderEfl.h>
     52#endif
     53
    5054namespace CoreIPC {
    5155    class DataReference;
     
    6872#if PLATFORM(QT)
    6973class QtFileDownloader;
     74#endif
     75
     76#if PLATFORM(EFL)
     77class FileDownloaderEfl;
    7078#endif
    7179
     
    147155    RefPtr<WebCore::ResourceHandle> m_resourceHandle;
    148156#endif
     157#if PLATFORM(EFL)
     158    OwnPtr<FileDownloaderEfl> m_fileDownloader;
     159#endif
    149160};
    150161
  • trunk/Source/WebKit2/WebProcess/Downloads/efl/DownloadEfl.cpp

    r104122 r107180  
    2121#include "Download.h"
    2222
     23#include "FileDownloaderEfl.h"
    2324#include <WebCore/NotImplemented.h>
    2425
     
    2930void Download::start(WebPage* initiatingWebPage)
    3031{
    31     notImplemented();
     32    m_fileDownloader = FileDownloaderEfl::create(this);
     33    m_fileDownloader->start(initiatingWebPage, m_request);
    3234}
    3335
  • trunk/Source/WebKit2/WebProcess/Downloads/efl/FileDownloaderEfl.cpp

    • Property svn:executable deleted
    r107179 r107180  
    1919
    2020#include "config.h"
    21 #include "Download.h"
     21#include "FileDownloaderEfl.h"
    2222
    2323#include <WebCore/NotImplemented.h>
     
    2727namespace WebKit {
    2828
    29 void Download::start(WebPage* initiatingWebPage)
     29PassOwnPtr<FileDownloaderEfl> FileDownloaderEfl::create(Download* download)
     30{
     31    return adoptPtr(new FileDownloaderEfl(download));
     32}
     33
     34FileDownloaderEfl::FileDownloaderEfl(Download* download)
     35    : m_download(download)
     36{
     37    ASSERT(download);
     38}
     39
     40FileDownloaderEfl::~FileDownloaderEfl()
     41{
     42}
     43
     44void FileDownloaderEfl::start(WebPage*, ResourceRequest&)
    3045{
    3146    notImplemented();
    3247}
    3348
    34 void Download::startWithHandle(WebPage* initiatingPage, ResourceHandle* handle, const ResourceResponse& response)
     49void FileDownloaderEfl::didReceiveResponse(ResourceHandle*, const ResourceResponse&)
    3550{
    3651    notImplemented();
    3752}
    3853
    39 void Download::cancel()
     54void FileDownloaderEfl::didReceiveData(ResourceHandle*, const char*, int, int)
    4055{
    4156    notImplemented();
    4257}
    4358
    44 void Download::platformInvalidate()
     59void FileDownloaderEfl::didFinishLoading(ResourceHandle*, double)
    4560{
    4661    notImplemented();
    4762}
    4863
    49 void Download::didDecideDestination(const String& destination, bool allowOverwrite)
     64void FileDownloaderEfl::didFail(ResourceHandle*, const ResourceError&)
    5065{
    5166    notImplemented();
    5267}
    5368
    54 void Download::platformDidFinish()
     69bool FileDownloaderEfl::shouldUseCredentialStorage(ResourceHandle*)
     70{
     71    return false;
     72}
     73
     74void FileDownloaderEfl::didReceiveAuthenticationChallenge(ResourceHandle*, const AuthenticationChallenge&)
    5575{
    5676    notImplemented();
    5777}
    5878
    59 void Download::receivedCredential(const AuthenticationChallenge& authenticationChallenge, const Credential& credential)
     79void FileDownloaderEfl::didCancelAuthenticationChallenge(ResourceHandle*, const AuthenticationChallenge&)
    6080{
    6181    notImplemented();
    6282}
    6383
    64 void Download::receivedRequestToContinueWithoutCredential(const AuthenticationChallenge& authenticationChallenge)
    65 {
    66     notImplemented();
    67 }
    68 
    69 void Download::receivedCancellation(const AuthenticationChallenge& authenticationChallenge)
    70 {
    71     notImplemented();
    72 }
    73 
    74 void Download::useCredential(const WebCore::AuthenticationChallenge& authenticationChallenge, const WebCore::Credential& credential)
    75 {
    76     notImplemented();
    77 }
    78 
    79 void Download::continueWithoutCredential(const WebCore::AuthenticationChallenge& authenticationChallenge)
    80 {
    81     notImplemented();
    82 }
    83 
    84 void Download::cancelAuthenticationChallenge(const WebCore::AuthenticationChallenge& authenticationChallenge)
     84void FileDownloaderEfl::receivedCancellation(ResourceHandle*, const AuthenticationChallenge&)
    8585{
    8686    notImplemented();
Note: See TracChangeset for help on using the changeset viewer.