1/*
2 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
3 * Copyright (C) 2010 Samsung Electronics
4 * Copyright (C) 2012 ProFUSION embedded systems
5 *
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions
10 * are met:
11 * 1. Redistributions of source code must retain the above copyright
12 *    notice, this list of conditions and the following disclaimer.
13 * 2. Redistributions in binary form must reproduce the above copyright
14 *    notice, this list of conditions and the following disclaimer in the
15 *    documentation and/or other materials provided with the distribution.
16 *
17 * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
18 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
20 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
21 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
22 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
23 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
24 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
25 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 */
29
30#include "config.h"
31#include "FrameNetworkingContextEfl.h"
32
33#include "NotImplemented.h"
34#include "ResourceHandle.h"
35#include "ewk_frame.h"
36#include "ewk_view.h"
37#include "ewk_view_private.h"
38
39#include <Evas.h>
40
41namespace WebCore {
42
43PassRefPtr<FrameNetworkingContextEfl> FrameNetworkingContextEfl::create(Frame* frame, Evas_Object* ewkFrame)
44{
45    return adoptRef(new FrameNetworkingContextEfl(frame, ewkFrame));
46}
47
48FrameNetworkingContextEfl::FrameNetworkingContextEfl(Frame* frame, Evas_Object* ewkFrame)
49    : FrameNetworkingContext(frame)
50    , m_ewkFrame(ewkFrame)
51{
52}
53
54NetworkStorageSession& FrameNetworkingContextEfl::storageSession() const
55{
56    if (NetworkStorageSession* session = EWKPrivate::storageSession(ewk_frame_view_get(m_ewkFrame)))
57        return *session;
58    return NetworkStorageSession::defaultStorageSession();
59}
60
61uint64_t FrameNetworkingContextEfl::initiatingPageID() const
62{
63    notImplemented();
64    return 0;
65}
66
67}
68