Пример #1
0
void ewk_intent_request_unref(Ewk_Intent_Request* request)
{
#if ENABLE(WEB_INTENTS)
    EINA_SAFETY_ON_NULL_RETURN(request);

    if (--request->__ref)
        return;

    ewk_intent_free(request->intent);
    delete request;
#endif
}
Пример #2
0
void DumpRenderTreeSupportEfl::deliverWebIntent(Evas_Object* ewkFrame, JSStringRef action, JSStringRef type, JSStringRef data)
{
#if ENABLE(WEB_INTENTS)
    RefPtr<WebCore::SerializedScriptValue> serializedData = WebCore::SerializedScriptValue::create(data->string());
    WebCore::ExceptionCode ec = 0;
    WebCore::MessagePortArray ports;
    RefPtr<WebCore::Intent> coreIntent = WebCore::Intent::create(action->string(), type->string(), serializedData.get(), ports, ec);
    if (ec)
        return;
    Ewk_Intent* ewkIntent = ewk_intent_new(coreIntent.get());
    ewk_frame_intent_deliver(ewkFrame, ewkIntent);
    ewk_intent_free(ewkIntent);
#endif
}