Changeset 121732 in webkit


Ignore:
Timestamp:
Jul 2, 2012 11:27:10 PM (12 years ago)
Author:
commit-queue@webkit.org
Message:

[EFL][WK2] Add API to inspect a Web Intent service
https://bugs.webkit.org/show_bug.cgi?id=90066

Patch by Christophe Dumez <Christophe Dumez> on 2012-07-02
Reviewed by Kenneth Rohde Christiansen.

Add EFL API to inspect a Web Intent Service and emit
a signal on the view when a new intent service
registers.

  • PlatformEfl.cmake:
  • UIProcess/API/efl/EWebKit2.h:
  • UIProcess/API/efl/ewk_intent_service.cpp: Added.

(_Ewk_Intent_Service):
(ewk_intent_service_ref):
(ewk_intent_service_unref):
(ewk_intent_service_action_get):
(ewk_intent_service_type_get):
(ewk_intent_service_href_get):
(ewk_intent_service_title_get):
(ewk_intent_service_disposition_get):
(ewk_intent_service_new):

  • UIProcess/API/efl/ewk_intent_service.h: Added.
  • UIProcess/API/efl/ewk_intent_service_private.h: Copied from Source/WebKit2/UIProcess/API/efl/ewk_view_loader_client.cpp.
  • UIProcess/API/efl/ewk_view.cpp:

(ewk_view_intent_service_register):

  • UIProcess/API/efl/ewk_view.h:
  • UIProcess/API/efl/ewk_view_loader_client.cpp:

(registerIntentServiceForFrame):
(ewk_view_loader_client_attach):

  • UIProcess/API/efl/ewk_view_private.h:
Location:
trunk/Source/WebKit2
Files:
3 added
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r121731 r121732  
     12012-07-02  Christophe Dumez  <christophe.dumez@intel.com>
     2
     3        [EFL][WK2] Add API to inspect a Web Intent service
     4        https://bugs.webkit.org/show_bug.cgi?id=90066
     5
     6        Reviewed by Kenneth Rohde Christiansen.
     7
     8        Add EFL API to inspect a Web Intent Service and emit
     9        a signal on the view when a new intent service
     10        registers.
     11
     12        * PlatformEfl.cmake:
     13        * UIProcess/API/efl/EWebKit2.h:
     14        * UIProcess/API/efl/ewk_intent_service.cpp: Added.
     15        (_Ewk_Intent_Service):
     16        (ewk_intent_service_ref):
     17        (ewk_intent_service_unref):
     18        (ewk_intent_service_action_get):
     19        (ewk_intent_service_type_get):
     20        (ewk_intent_service_href_get):
     21        (ewk_intent_service_title_get):
     22        (ewk_intent_service_disposition_get):
     23        (ewk_intent_service_new):
     24        * UIProcess/API/efl/ewk_intent_service.h: Added.
     25        * UIProcess/API/efl/ewk_intent_service_private.h: Copied from Source/WebKit2/UIProcess/API/efl/ewk_view_loader_client.cpp.
     26        * UIProcess/API/efl/ewk_view.cpp:
     27        (ewk_view_intent_service_register):
     28        * UIProcess/API/efl/ewk_view.h:
     29        * UIProcess/API/efl/ewk_view_loader_client.cpp:
     30        (registerIntentServiceForFrame):
     31        (ewk_view_loader_client_attach):
     32        * UIProcess/API/efl/ewk_view_private.h:
     33
    1342012-07-02  Christophe Dumez  <christophe.dumez@intel.com>
    235
  • trunk/Source/WebKit2/PlatformEfl.cmake

    r121649 r121732  
    3434    UIProcess/API/efl/ewk_context.cpp
    3535    UIProcess/API/efl/ewk_intent.cpp
     36    UIProcess/API/efl/ewk_intent_service.cpp
    3637    UIProcess/API/efl/ewk_view.cpp
    3738    UIProcess/API/efl/ewk_view_loader_client.cpp
  • trunk/Source/WebKit2/UIProcess/API/efl/EWebKit2.h

    r121649 r121732  
    3030#include "ewk_context.h"
    3131#include "ewk_intent.h"
     32#include "ewk_intent_service.h"
    3233#include "ewk_view.h"
    3334
  • trunk/Source/WebKit2/UIProcess/API/efl/ewk_view.cpp

    r121649 r121732  
    644644}
    645645
     646#if ENABLE(WEB_INTENTS_TAG)
     647/**
     648 * @internal
     649 * The view received a new intent service registration.
     650 *
     651 * Emits signal: "intent,service,register" with pointer to a Ewk_Intent_Service.
     652 */
     653void ewk_view_intent_service_register(Evas_Object* ewkView, const Ewk_Intent_Service* ewkIntentService)
     654{
     655    evas_object_smart_callback_call(ewkView, "intent,service,register", const_cast<Ewk_Intent_Service*>(ewkIntentService));
     656}
     657#endif // ENABLE(WEB_INTENTS_TAG)
     658
    646659WebPageProxy* ewk_view_page_get(const Evas_Object* ewkView)
    647660{
  • trunk/Source/WebKit2/UIProcess/API/efl/ewk_view.h

    r121649 r121732  
    2828 *
    2929 * - "intent,request,new", Ewk_Intent_Request*: reports new Web intent request.
     30 * - "intent,service,register", Ewk_Intent_Service*: reports new Web intent service registration.
    3031 * - "title,changed", const char*: title of the main frame was changed.
    3132 */
  • trunk/Source/WebKit2/UIProcess/API/efl/ewk_view_loader_client.cpp

    r121649 r121732  
    2929#include "ewk_intent.h"
    3030#include "ewk_intent_private.h"
     31#include "ewk_intent_service.h"
     32#include "ewk_intent_service_private.h"
    3133#include "ewk_view_loader_client_private.h"
    3234#include "ewk_view_private.h"
     
    5456#endif
    5557
     58#if ENABLE(WEB_INTENTS_TAG)
     59static void registerIntentServiceForFrame(WKPageRef page, WKFrameRef frame, WKIntentServiceInfoRef serviceInfo, const void *clientInfo)
     60{
     61    Evas_Object* ewkView = static_cast<Evas_Object*>(const_cast<void*>(clientInfo));
     62    Ewk_Intent_Service* ewkIntentService = ewk_intent_service_new(serviceInfo);
     63    ewk_view_intent_service_register(ewkView, ewkIntentService);
     64    ewk_intent_service_unref(ewkIntentService);
     65}
     66#endif
     67
    5668void ewk_view_loader_client_attach(WKPageRef pageRef, Evas_Object* ewkView)
    5769{
     
    6476    loadClient.didReceiveIntentForFrame = didReceiveIntentForFrame;
    6577#endif
     78#if ENABLE(WEB_INTENTS_TAG)
     79    loadClient.registerIntentServiceForFrame = registerIntentServiceForFrame;
     80#endif
    6681    WKPageSetPageLoaderClient(pageRef, &loadClient);
    6782}
  • trunk/Source/WebKit2/UIProcess/API/efl/ewk_view_private.h

    r121649 r121732  
    3434typedef struct _Ewk_Intent Ewk_Intent;
    3535#endif
     36#if ENABLE(WEB_INTENTS_TAG)
     37typedef struct _Ewk_Intent_Service Ewk_Intent_Service;
     38#endif
    3639
    3740void ewk_view_display(Evas_Object* ewkView, const WebCore::IntRect& rect);
     
    4447void ewk_view_intent_request_new(Evas_Object* ewkView, const Ewk_Intent* ewkIntent);
    4548#endif
     49#if ENABLE(WEB_INTENTS_TAG)
     50void ewk_view_intent_service_register(Evas_Object* ewkView, const Ewk_Intent_Service* ewkIntentService);
     51#endif
    4652
    4753WebKit::WebPageProxy* ewk_view_page_get(const Evas_Object* ewkView);
Note: See TracChangeset for help on using the changeset viewer.