haikuwebkit/Source/WebCore/page/UserMediaRequestIdentifier.h

41 lines
1.7 KiB
C
Raw Permalink Normal View History

Use UserMediaRequestIdentifier in WebKit rather than a mysterious uint64_t https://bugs.webkit.org/show_bug.cgi?id=229308 Reviewed by Youenn Fablet. Source/WebCore: Move UserMediaRequestIdentifier to its own header. * Headers.cmake: * Modules/mediastream/UserMediaRequest.h: * WebCore.xcodeproj/project.pbxproj: Source/WebKit: Use the existing WebCore::UserMediaRequestIdentifier in WebKit code. We need to pull it out of the ENABLE(MEDIA_STREAM) #ifdef. In UserMediaPermissionRequestManagerProxy use a new identifier type, MediaDevicePermissionRequestIdentifier, which is used to identify pending permission requests (but never send to the web process). * Scripts/webkit/messages.py: (types_that_cannot_be_forward_declared): Sort (headers_for_type): * UIProcess/MediaKeySystemPermissionRequestManagerProxy.h: * UIProcess/UserMediaPermissionRequestManagerProxy.cpp: (WebKit::UserMediaPermissionRequestManagerProxy::denyRequest): (WebKit::UserMediaPermissionRequestManagerProxy::grantRequest): (WebKit::UserMediaPermissionRequestManagerProxy::finishGrantingRequest): (WebKit::UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame): (WebKit::UserMediaPermissionRequestManagerProxy::processUserMediaPermissionRequest): (WebKit::UserMediaPermissionRequestManagerProxy::processUserMediaPermissionInvalidRequest): (WebKit::UserMediaPermissionRequestManagerProxy::processUserMediaPermissionValidRequest): (WebKit::UserMediaPermissionRequestManagerProxy::checkUserMediaPermissionForSpeechRecognition): (WebKit::UserMediaPermissionRequestManagerProxy::getUserMediaPermissionInfo): (WebKit::UserMediaPermissionRequestManagerProxy::enumerateMediaDevicesForFrame): (WebKit::generateRequestID): Deleted. * UIProcess/UserMediaPermissionRequestManagerProxy.h: * UIProcess/UserMediaPermissionRequestProxy.cpp: (WebKit::UserMediaPermissionRequestProxy::UserMediaPermissionRequestProxy): * UIProcess/UserMediaPermissionRequestProxy.h: (WebKit::UserMediaPermissionRequestProxy::create): (WebKit::UserMediaPermissionRequestProxy::userMediaID const): * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::requestUserMediaPermissionForFrame): * UIProcess/WebPageProxy.h: * UIProcess/WebPageProxy.messages.in: * WebKit.xcodeproj/project.pbxproj: Some files that were in Sources.txt were missing from the project. * WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp: (WebKit::UserMediaPermissionRequestManager::sendUserMediaRequest): (WebKit::UserMediaPermissionRequestManager::userMediaAccessWasGranted): (WebKit::UserMediaPermissionRequestManager::userMediaAccessWasDenied): * WebProcess/MediaStream/UserMediaPermissionRequestManager.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::userMediaAccessWasGranted): (WebKit::WebPage::userMediaAccessWasDenied): * WebProcess/WebPage/WebPage.h: * WebProcess/WebPage/WebPage.messages.in: Canonical link: https://commits.webkit.org/240775@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281360 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-21 02:56:54 +00:00
/*
* Copyright (C) 2021 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer
* in the documentation and/or other materials provided with the
* distribution.
* 3. Neither the name of Ericsson nor the names of its contributors
* may be used to endorse or promote products derived from this
* software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#pragma once
#include <wtf/ObjectIdentifier.h>
namespace WebCore {
enum UserMediaRequestIdentifierType { };
using UserMediaRequestIdentifier = ObjectIdentifier<UserMediaRequestIdentifierType>;
} // namespace WebCore