blob: 08d59ad82b661c24c38c5f613ab383cccced8437 [file] [log] [blame]
roger_fong@apple.coma6b7dc32013-06-18 20:14:32 +00001/*
2 * Copyright (C) 2013 Apple Inc. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 *
13 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
14 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
15 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
17 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
18 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
19 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
20 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
21 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
23 * THE POSSIBILITY OF SUCH DAMAGE.
24 */
achristensen@apple.com69b70522016-10-11 18:20:23 +000025#pragma once
roger_fong@apple.coma6b7dc32013-06-18 20:14:32 +000026
27#include <WebCore/FrameNetworkingContext.h>
28
29class WebFrameNetworkingContext : public WebCore::FrameNetworkingContext {
30public:
darin@apple.comc04189e2017-01-18 05:17:17 +000031 static Ref<WebFrameNetworkingContext> create(WebCore::Frame* frame)
roger_fong@apple.coma6b7dc32013-06-18 20:14:32 +000032 {
darin@apple.comc04189e2017-01-18 05:17:17 +000033 return adoptRef(*new WebFrameNetworkingContext(frame));
roger_fong@apple.coma6b7dc32013-06-18 20:14:32 +000034 }
35
achristensen@apple.com69b70522016-10-11 18:20:23 +000036#if USE(CFURLCONNECTION)
roger_fong@apple.comccb07032013-06-18 20:28:26 +000037 static void setCookieAcceptPolicyForAllContexts(WebKitCookieStorageAcceptPolicy);
38#endif
39 static void setPrivateBrowsingStorageSessionIdentifierBase(const String&);
antti@apple.comb392fe32016-06-15 14:12:16 +000040 static WebCore::NetworkStorageSession& ensurePrivateBrowsingSession();
roger_fong@apple.coma6b7dc32013-06-18 20:14:32 +000041 static void destroyPrivateBrowsingSession();
42
43private:
andersca@apple.com9bd93742014-12-02 20:53:40 +000044 explicit WebFrameNetworkingContext(WebCore::Frame* frame)
45 : WebCore::FrameNetworkingContext(frame)
roger_fong@apple.coma6b7dc32013-06-18 20:14:32 +000046 {
47 }
48
darin@apple.com11ff47c2016-03-04 16:47:55 +000049 WebCore::ResourceError blockedError(const WebCore::ResourceRequest&) const override;
achristensen@apple.com04a81de2019-01-08 20:49:39 +000050 WebCore::NetworkStorageSession* storageSession() const override;
roger_fong@apple.coma6b7dc32013-06-18 20:14:32 +000051};