1 | /* |
2 | * Copyright (C) 2014 Igalia S.L. |
3 | * Copyright (C) 2016-2018 Apple Inc. All rights reserved. |
4 | * |
5 | * This library is free software; you can redistribute it and/or |
6 | * modify it under the terms of the GNU Lesser General Public |
7 | * License as published by the Free Software Foundation; either |
8 | * version 2 of the License, or (at your option) any later version. |
9 | * |
10 | * This library is distributed in the hope that it will be useful, |
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
13 | * Lesser General Public License for more details. |
14 | * |
15 | * You should have received a copy of the GNU Lesser General Public |
16 | * License along with this library; if not, write to the Free Software |
17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
18 | */ |
19 | |
20 | #ifndef WebUserMediaClient_h |
21 | #define WebUserMediaClient_h |
22 | |
23 | #if ENABLE(MEDIA_STREAM) |
24 | |
25 | #include <WebCore/UserMediaClient.h> |
26 | |
27 | namespace WebKit { |
28 | |
29 | class WebPage; |
30 | |
31 | class WebUserMediaClient : public WebCore::UserMediaClient { |
32 | public: |
33 | WebUserMediaClient(WebPage&); |
34 | ~WebUserMediaClient() { } |
35 | |
36 | private: |
37 | void pageDestroyed() override; |
38 | |
39 | void requestUserMediaAccess(WebCore::UserMediaRequest&) override; |
40 | void cancelUserMediaAccessRequest(WebCore::UserMediaRequest&) override; |
41 | |
42 | void enumerateMediaDevices(WebCore::MediaDevicesEnumerationRequest&) final; |
43 | void cancelMediaDevicesEnumerationRequest(WebCore::MediaDevicesEnumerationRequest&) final; |
44 | |
45 | DeviceChangeObserverToken addDeviceChangeObserver(WTF::Function<void()>&&) final; |
46 | void removeDeviceChangeObserver(DeviceChangeObserverToken) final; |
47 | |
48 | void initializeFactories(); |
49 | |
50 | WebPage& m_page; |
51 | }; |
52 | |
53 | } // namespace WebCore |
54 | |
55 | #endif // ENABLE(MEDIA_STREAM) |
56 | |
57 | #endif // WebUserMediaClient_h |
58 | |