コード例 #1
0
ファイル: ewk_intent_request.cpp プロジェクト: dog-god/iptv
/**
 * @internal
 *
 * Creates a new Ewk_Intent_Request object.
 *
 * @param core WebCore::IntentRequest instance to use internally.
 * @return a new allocated the Ewk_Intent_Request object on sucess or @c 0 on failure
 */
Ewk_Intent_Request* ewk_intent_request_new(PassRefPtr<WebCore::IntentRequest> core)
{
    EINA_SAFETY_ON_NULL_RETURN_VAL(core, 0);
    Ewk_Intent_Request* request = new Ewk_Intent_Request;
    request->__ref = 1;
    request->core = core;
    request->intent = ewk_intent_new(request->core->intent());

    return request;
}
コード例 #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
}