Remove "virtual" from all lines that have both "virtual" and "override".
[WebKit-https.git] / Source / WebKit2 / UIProcess / Network / CustomProtocols / soup / WebSoupCustomProtocolRequestManager.h
1 /*
2  * Copyright (C) 2013 Igalia S.L.
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Library General Public
6  * License as published by the Free Software Foundation; either
7  * version 2 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * Library General Public License for more details.
13  *
14  * You should have received a copy of the GNU Library General Public License
15  * along with this library; see the file COPYING.LIB.  If not, write to
16  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17  * Boston, MA 02110-1301, USA.
18  */
19
20 #ifndef WebSoupCustomProtocolRequestManager_h
21 #define WebSoupCustomProtocolRequestManager_h
22
23 #include "APIObject.h"
24 #include "WebContextSupplement.h"
25 #include "WebSoupCustomProtocolRequestManagerClient.h"
26 #include <wtf/PassRefPtr.h>
27 #include <wtf/RefPtr.h>
28 #include <wtf/text/WTFString.h>
29
30 namespace API {
31 class Data;
32 }
33
34 namespace WebCore {
35 class ResourceError;
36 class ResourceRequest;
37 class ResourceResponse;
38 }
39
40 namespace WebKit {
41
42 class WebProcessPool;
43
44 class WebSoupCustomProtocolRequestManager : public API::ObjectImpl<API::Object::Type::SoupCustomProtocolRequestManager>, public WebContextSupplement {
45 public:
46     static const char* supplementName();
47
48     static Ref<WebSoupCustomProtocolRequestManager> create(WebProcessPool*);
49     virtual ~WebSoupCustomProtocolRequestManager();
50
51     void initializeClient(const WKSoupCustomProtocolRequestManagerClientBase*);
52
53     void registerSchemeForCustomProtocol(const String& scheme);
54     void unregisterSchemeForCustomProtocol(const String& scheme);
55
56     void startLoading(uint64_t customProtocolID, const WebCore::ResourceRequest&);
57     void stopLoading(uint64_t customProtocolID);
58
59     void didReceiveResponse(uint64_t customProtocolID, const WebCore::ResourceResponse&);
60     void didLoadData(uint64_t customProtocolID, const API::Data*);
61     void didFailWithError(uint64_t customProtocolID, const WebCore::ResourceError&);
62     void didFinishLoading(uint64_t customProtocolID);
63
64     const Vector<String>& registeredSchemesForCustomProtocols() const { return m_registeredSchemes; }
65
66     using API::Object::ref;
67     using API::Object::deref;
68
69 private:
70     WebSoupCustomProtocolRequestManager(WebProcessPool*);
71
72     // WebContextSupplement
73     void processPoolDestroyed() override;
74     void processDidClose(WebProcessProxy*) override;
75     void refWebContextSupplement() override;
76     void derefWebContextSupplement() override;
77
78     WebSoupCustomProtocolRequestManagerClient m_client;
79     Vector<String> m_registeredSchemes;
80 };
81
82 } // namespace WebKit
83
84 #endif // WebSoupCustomProtocolRequestManager_h