Changeset 141389 in webkit


Ignore:
Timestamp:
Jan 31, 2013 12:49:47 AM (11 years ago)
Author:
mikhail.pozdnyakov@intel.com
Message:

[EFL][WK2] RequestManagerClientEfl, DownloadManagerEfl and ContextHistoryClientEfl should be based on C API
https://bugs.webkit.org/show_bug.cgi?id=107685

Reviewed by Benjamin Poulain.

RequestManagerClientEfl, DownloadManagerEfl and ContextHistoryClientEfl
should be based on C API so that API layering is not violated.

  • UIProcess/API/efl/ewk_context.cpp:

(EwkContext::EwkContext):

  • UIProcess/efl/ContextHistoryClientEfl.cpp:

(WebKit::ContextHistoryClientEfl::ContextHistoryClientEfl):
(WebKit::ContextHistoryClientEfl::~ContextHistoryClientEfl):

  • UIProcess/efl/ContextHistoryClientEfl.h:

(WebKit::ContextHistoryClientEfl::create):
(ContextHistoryClientEfl):

  • UIProcess/efl/DownloadManagerEfl.cpp:

(WebKit::DownloadManagerEfl::DownloadManagerEfl):
(WebKit::DownloadManagerEfl::~DownloadManagerEfl):

  • UIProcess/efl/DownloadManagerEfl.h:

(WebKit::DownloadManagerEfl::create):
(DownloadManagerEfl):

  • UIProcess/efl/RequestManagerClientEfl.cpp:

(WebKit::RequestManagerClientEfl::RequestManagerClientEfl):

  • UIProcess/efl/RequestManagerClientEfl.h:

(WebKit::RequestManagerClientEfl::create):
(RequestManagerClientEfl):

Location:
trunk/Source/WebKit2
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r141387 r141389  
     12013-01-31  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
     2
     3        [EFL][WK2] RequestManagerClientEfl, DownloadManagerEfl and ContextHistoryClientEfl should be based on C API
     4        https://bugs.webkit.org/show_bug.cgi?id=107685
     5
     6        Reviewed by Benjamin Poulain.
     7
     8        RequestManagerClientEfl, DownloadManagerEfl and ContextHistoryClientEfl
     9        should be based on C API so that API layering is not violated.
     10
     11        * UIProcess/API/efl/ewk_context.cpp:
     12        (EwkContext::EwkContext):
     13        * UIProcess/efl/ContextHistoryClientEfl.cpp:
     14        (WebKit::ContextHistoryClientEfl::ContextHistoryClientEfl):
     15        (WebKit::ContextHistoryClientEfl::~ContextHistoryClientEfl):
     16        * UIProcess/efl/ContextHistoryClientEfl.h:
     17        (WebKit::ContextHistoryClientEfl::create):
     18        (ContextHistoryClientEfl):
     19        * UIProcess/efl/DownloadManagerEfl.cpp:
     20        (WebKit::DownloadManagerEfl::DownloadManagerEfl):
     21        (WebKit::DownloadManagerEfl::~DownloadManagerEfl):
     22        * UIProcess/efl/DownloadManagerEfl.h:
     23        (WebKit::DownloadManagerEfl::create):
     24        (DownloadManagerEfl):
     25        * UIProcess/efl/RequestManagerClientEfl.cpp:
     26        (WebKit::RequestManagerClientEfl::RequestManagerClientEfl):
     27        * UIProcess/efl/RequestManagerClientEfl.h:
     28        (WebKit::RequestManagerClientEfl::create):
     29        (RequestManagerClientEfl):
     30
    1312013-01-31  Sheriff Bot  <webkit.review.bot@gmail.com>
    232
  • trunk/Source/WebKit2/UIProcess/API/efl/ewk_context.cpp

    r140905 r141389  
    7575    , m_networkInfoProvider(NetworkInfoProvider::create(m_context))
    7676#endif
    77     , m_downloadManager(DownloadManagerEfl::create(this))
    78     , m_requestManagerClient(RequestManagerClientEfl::create(this))
    79     , m_historyClient(ContextHistoryClientEfl::create(m_context))
     77    , m_downloadManager(DownloadManagerEfl::create(toAPI(m_context.get())))
     78    , m_requestManagerClient(RequestManagerClientEfl::create(toAPI(m_context.get())))
     79    , m_historyClient(ContextHistoryClientEfl::create(toAPI(m_context.get())))
    8080{
    8181    ContextMap::AddResult result = contextMap().add(m_context.get(), this);
  • trunk/Source/WebKit2/UIProcess/efl/ContextHistoryClientEfl.cpp

    r140686 r141389  
    2727#include "ContextHistoryClientEfl.h"
    2828
    29 #include "DownloadProxy.h"
    3029#include "EwkView.h"
    3130#include "WKAPICast.h"
     
    107106}
    108107
    109 ContextHistoryClientEfl::ContextHistoryClientEfl(PassRefPtr<WebContext> context)
     108ContextHistoryClientEfl::ContextHistoryClientEfl(WKContextRef context)
    110109    : m_context(context)
    111110    , m_userData(0)
     
    130129    wkHistoryClient.populateVisitedLinks = populateVisitedLinks;
    131130
    132     m_context->initializeHistoryClient(&wkHistoryClient);
     131    WKContextSetHistoryClient(m_context.get(), &wkHistoryClient);
    133132}
    134133
    135134ContextHistoryClientEfl::~ContextHistoryClientEfl()
    136135{
    137     m_context->initializeHistoryClient(0);
     136    WKContextSetHistoryClient(m_context.get(), 0);
    138137}
    139138
  • trunk/Source/WebKit2/UIProcess/efl/ContextHistoryClientEfl.h

    r136833 r141389  
    2727#define ContextHistoryClientEfl_h
    2828
    29 #include "WebContext.h"
    3029#include "ewk_context.h"
    3130#include <WebKit2/WKBase.h>
     31#include <WebKit2/WKRetainPtr.h>
    3232#include <wtf/PassOwnPtr.h>
    3333
     
    3636class ContextHistoryClientEfl {
    3737public:
    38     static PassOwnPtr<ContextHistoryClientEfl> create(PassRefPtr<WebContext> context)
     38    static PassOwnPtr<ContextHistoryClientEfl> create(WKContextRef context)
    3939    {
    4040        return adoptPtr(new ContextHistoryClientEfl(context));
     
    4646
    4747private:
    48     explicit ContextHistoryClientEfl(PassRefPtr<WebContext>);
     48    explicit ContextHistoryClientEfl(WKContextRef);
    4949
    5050    static void didNavigateWithNavigationData(WKContextRef, WKPageRef, WKNavigationDataRef, WKFrameRef, const void*);
     
    5454    static void populateVisitedLinks(WKContextRef, const void*);
    5555
    56     RefPtr<WebContext> m_context;
     56    WKRetainPtr<WKContextRef> m_context;
    5757    void* m_userData;
    5858    Ewk_History_Navigation_Cb m_navigate;
  • trunk/Source/WebKit2/UIProcess/efl/DownloadManagerEfl.cpp

    r141008 r141389  
    118118}
    119119
    120 DownloadManagerEfl::DownloadManagerEfl(EwkContext* context)
     120DownloadManagerEfl::DownloadManagerEfl(WKContextRef context)
    121121    : m_context(context)
    122122{
     
    134134    wkDownloadClient.didFinish = didFinish;
    135135
    136     WKContextSetDownloadClient(toAPI(context->webContext().get()), &wkDownloadClient);
     136    WKContextSetDownloadClient(m_context.get(), &wkDownloadClient);
    137137}
    138138
    139139DownloadManagerEfl::~DownloadManagerEfl()
    140140{
    141     WKContextSetDownloadClient(toAPI(m_context->webContext().get()), 0);
     141    WKContextSetDownloadClient(m_context.get(), 0);
    142142}
    143143
  • trunk/Source/WebKit2/UIProcess/efl/DownloadManagerEfl.h

    r141008 r141389  
    2828
    2929#include "ewk_download_job_private.h"
     30#include <WebKit2/WKRetainPtr.h>
    3031#include <wtf/HashMap.h>
    3132#include <wtf/PassOwnPtr.h>
    3233#include <wtf/RefPtr.h>
    33 
    34 class EwkContext;
    35 class EwkDownloadJob;
    3634
    3735namespace WebKit {
     
    3937class DownloadManagerEfl {
    4038public:
    41     static PassOwnPtr<DownloadManagerEfl> create(EwkContext* context)
     39    static PassOwnPtr<DownloadManagerEfl> create(WKContextRef context)
    4240    {
    4341        return adoptPtr(new DownloadManagerEfl(context));
     
    4947
    5048private:
    51     explicit DownloadManagerEfl(EwkContext*);
     49    explicit DownloadManagerEfl(WKContextRef);
    5250
    5351    EwkDownloadJob* ewkDownloadJob(WKDownloadRef);
     
    6260    static void didFinish(WKContextRef, WKDownloadRef, const void* clientInfo);
    6361
    64     EwkContext* m_context;
     62    WKRetainPtr<WKContextRef> m_context;
    6563    HashMap<uint64_t, RefPtr<EwkDownloadJob> > m_downloadJobs;
    6664};
  • trunk/Source/WebKit2/UIProcess/efl/RequestManagerClientEfl.cpp

    r135461 r141389  
    2929#include "WKContextSoup.h"
    3030#include "WKSoupRequestManager.h"
    31 #include "WebSoupRequestManagerProxy.h"
    3231#include "ewk_context_private.h"
    3332#include "ewk_url_scheme_request_private.h"
     
    6766}
    6867
    69 RequestManagerClientEfl::RequestManagerClientEfl(EwkContext* context)
    70     : m_soupRequestManager(WKContextGetSoupRequestManager(toAPI(context->webContext().get())))
     68RequestManagerClientEfl::RequestManagerClientEfl(WKContextRef context)
     69    : m_soupRequestManager(WKContextGetSoupRequestManager(context))
    7170{
    72     ASSERT(context);
     71    ASSERT(m_soupRequestManager);
    7372
    7473    WKSoupRequestManagerClient wkRequestManagerClient;
     
    9190
    9291    m_urlSchemeHandlers.set(scheme, EwkUrlSchemeHandler(callback, userData));
    93     toImpl(m_soupRequestManager.get())->registerURIScheme(scheme);
     92    WKSoupRequestManagerRegisterURIScheme(m_soupRequestManager.get(), adoptWK(toCopiedAPI(scheme)).get());
    9493}
    9594
  • trunk/Source/WebKit2/UIProcess/efl/RequestManagerClientEfl.h

    r135461 r141389  
    2727#define RequestManagerClientEfl_h
    2828
    29 #include "WKRetainPtr.h"
    3029#include "ewk_context_private.h"
    3130#include <WebKit2/WKBase.h>
     31#include <WebKit2/WKRetainPtr.h>
    3232#include <wtf/HashMap.h>
    3333#include <wtf/PassOwnPtr.h>
     
    3939public:
    4040    ~RequestManagerClientEfl();
    41     static PassOwnPtr<RequestManagerClientEfl> create(EwkContext* context)
     41    static PassOwnPtr<RequestManagerClientEfl> create(WKContextRef context)
    4242    {
    4343        return adoptPtr(new RequestManagerClientEfl(context));
     
    4747
    4848private:
    49     explicit RequestManagerClientEfl(EwkContext*);
     49    explicit RequestManagerClientEfl(WKContextRef);
    5050
    5151    static void didReceiveURIRequest(WKSoupRequestManagerRef, WKURLRef, WKPageRef, uint64_t requestID, const void* clientInfo);
Note: See TracChangeset for help on using the changeset viewer.