Changeset 141389 in webkit
- Timestamp:
- Jan 31, 2013 12:49:47 AM (11 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r141387 r141389 1 2013-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 1 31 2013-01-31 Sheriff Bot <webkit.review.bot@gmail.com> 2 32 -
trunk/Source/WebKit2/UIProcess/API/efl/ewk_context.cpp
r140905 r141389 75 75 , m_networkInfoProvider(NetworkInfoProvider::create(m_context)) 76 76 #endif 77 , m_downloadManager(DownloadManagerEfl::create(t his))78 , m_requestManagerClient(RequestManagerClientEfl::create(t his))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()))) 80 80 { 81 81 ContextMap::AddResult result = contextMap().add(m_context.get(), this); -
trunk/Source/WebKit2/UIProcess/efl/ContextHistoryClientEfl.cpp
r140686 r141389 27 27 #include "ContextHistoryClientEfl.h" 28 28 29 #include "DownloadProxy.h"30 29 #include "EwkView.h" 31 30 #include "WKAPICast.h" … … 107 106 } 108 107 109 ContextHistoryClientEfl::ContextHistoryClientEfl( PassRefPtr<WebContext>context)108 ContextHistoryClientEfl::ContextHistoryClientEfl(WKContextRef context) 110 109 : m_context(context) 111 110 , m_userData(0) … … 130 129 wkHistoryClient.populateVisitedLinks = populateVisitedLinks; 131 130 132 m_context->initializeHistoryClient(&wkHistoryClient);131 WKContextSetHistoryClient(m_context.get(), &wkHistoryClient); 133 132 } 134 133 135 134 ContextHistoryClientEfl::~ContextHistoryClientEfl() 136 135 { 137 m_context->initializeHistoryClient(0);136 WKContextSetHistoryClient(m_context.get(), 0); 138 137 } 139 138 -
trunk/Source/WebKit2/UIProcess/efl/ContextHistoryClientEfl.h
r136833 r141389 27 27 #define ContextHistoryClientEfl_h 28 28 29 #include "WebContext.h"30 29 #include "ewk_context.h" 31 30 #include <WebKit2/WKBase.h> 31 #include <WebKit2/WKRetainPtr.h> 32 32 #include <wtf/PassOwnPtr.h> 33 33 … … 36 36 class ContextHistoryClientEfl { 37 37 public: 38 static PassOwnPtr<ContextHistoryClientEfl> create( PassRefPtr<WebContext>context)38 static PassOwnPtr<ContextHistoryClientEfl> create(WKContextRef context) 39 39 { 40 40 return adoptPtr(new ContextHistoryClientEfl(context)); … … 46 46 47 47 private: 48 explicit ContextHistoryClientEfl( PassRefPtr<WebContext>);48 explicit ContextHistoryClientEfl(WKContextRef); 49 49 50 50 static void didNavigateWithNavigationData(WKContextRef, WKPageRef, WKNavigationDataRef, WKFrameRef, const void*); … … 54 54 static void populateVisitedLinks(WKContextRef, const void*); 55 55 56 RefPtr<WebContext> m_context;56 WKRetainPtr<WKContextRef> m_context; 57 57 void* m_userData; 58 58 Ewk_History_Navigation_Cb m_navigate; -
trunk/Source/WebKit2/UIProcess/efl/DownloadManagerEfl.cpp
r141008 r141389 118 118 } 119 119 120 DownloadManagerEfl::DownloadManagerEfl( EwkContext*context)120 DownloadManagerEfl::DownloadManagerEfl(WKContextRef context) 121 121 : m_context(context) 122 122 { … … 134 134 wkDownloadClient.didFinish = didFinish; 135 135 136 WKContextSetDownloadClient( toAPI(context->webContext().get()), &wkDownloadClient);136 WKContextSetDownloadClient(m_context.get(), &wkDownloadClient); 137 137 } 138 138 139 139 DownloadManagerEfl::~DownloadManagerEfl() 140 140 { 141 WKContextSetDownloadClient( toAPI(m_context->webContext().get()), 0);141 WKContextSetDownloadClient(m_context.get(), 0); 142 142 } 143 143 -
trunk/Source/WebKit2/UIProcess/efl/DownloadManagerEfl.h
r141008 r141389 28 28 29 29 #include "ewk_download_job_private.h" 30 #include <WebKit2/WKRetainPtr.h> 30 31 #include <wtf/HashMap.h> 31 32 #include <wtf/PassOwnPtr.h> 32 33 #include <wtf/RefPtr.h> 33 34 class EwkContext;35 class EwkDownloadJob;36 34 37 35 namespace WebKit { … … 39 37 class DownloadManagerEfl { 40 38 public: 41 static PassOwnPtr<DownloadManagerEfl> create( EwkContext*context)39 static PassOwnPtr<DownloadManagerEfl> create(WKContextRef context) 42 40 { 43 41 return adoptPtr(new DownloadManagerEfl(context)); … … 49 47 50 48 private: 51 explicit DownloadManagerEfl( EwkContext*);49 explicit DownloadManagerEfl(WKContextRef); 52 50 53 51 EwkDownloadJob* ewkDownloadJob(WKDownloadRef); … … 62 60 static void didFinish(WKContextRef, WKDownloadRef, const void* clientInfo); 63 61 64 EwkContext*m_context;62 WKRetainPtr<WKContextRef> m_context; 65 63 HashMap<uint64_t, RefPtr<EwkDownloadJob> > m_downloadJobs; 66 64 }; -
trunk/Source/WebKit2/UIProcess/efl/RequestManagerClientEfl.cpp
r135461 r141389 29 29 #include "WKContextSoup.h" 30 30 #include "WKSoupRequestManager.h" 31 #include "WebSoupRequestManagerProxy.h"32 31 #include "ewk_context_private.h" 33 32 #include "ewk_url_scheme_request_private.h" … … 67 66 } 68 67 69 RequestManagerClientEfl::RequestManagerClientEfl( EwkContext*context)70 : m_soupRequestManager(WKContextGetSoupRequestManager( toAPI(context->webContext().get())))68 RequestManagerClientEfl::RequestManagerClientEfl(WKContextRef context) 69 : m_soupRequestManager(WKContextGetSoupRequestManager(context)) 71 70 { 72 ASSERT( context);71 ASSERT(m_soupRequestManager); 73 72 74 73 WKSoupRequestManagerClient wkRequestManagerClient; … … 91 90 92 91 m_urlSchemeHandlers.set(scheme, EwkUrlSchemeHandler(callback, userData)); 93 toImpl(m_soupRequestManager.get())->registerURIScheme(scheme);92 WKSoupRequestManagerRegisterURIScheme(m_soupRequestManager.get(), adoptWK(toCopiedAPI(scheme)).get()); 94 93 } 95 94 -
trunk/Source/WebKit2/UIProcess/efl/RequestManagerClientEfl.h
r135461 r141389 27 27 #define RequestManagerClientEfl_h 28 28 29 #include "WKRetainPtr.h"30 29 #include "ewk_context_private.h" 31 30 #include <WebKit2/WKBase.h> 31 #include <WebKit2/WKRetainPtr.h> 32 32 #include <wtf/HashMap.h> 33 33 #include <wtf/PassOwnPtr.h> … … 39 39 public: 40 40 ~RequestManagerClientEfl(); 41 static PassOwnPtr<RequestManagerClientEfl> create( EwkContext*context)41 static PassOwnPtr<RequestManagerClientEfl> create(WKContextRef context) 42 42 { 43 43 return adoptPtr(new RequestManagerClientEfl(context)); … … 47 47 48 48 private: 49 explicit RequestManagerClientEfl( EwkContext*);49 explicit RequestManagerClientEfl(WKContextRef); 50 50 51 51 static void didReceiveURIRequest(WKSoupRequestManagerRef, WKURLRef, WKPageRef, uint64_t requestID, const void* clientInfo);
Note: See TracChangeset
for help on using the changeset viewer.