Diff
Modified: trunk/Source/WebCore/ChangeLog (263497 => 263498)
--- trunk/Source/WebCore/ChangeLog 2020-06-25 03:58:07 UTC (rev 263497)
+++ trunk/Source/WebCore/ChangeLog 2020-06-25 04:25:05 UTC (rev 263498)
@@ -1,3 +1,55 @@
+2020-06-24 David Kilzer <[email protected]>
+
+ Use ObjectIdentifier<>instead of WebCore::nextPlaybackTargetClientContextId() in Document.cpp
+ <https://webkit.org/b/213546>
+ <rdar://problem/61803576>
+
+ Reviewed by Youenn Fablet.
+
+ Switch from uint64_t to WebCore::PlaybackTargetClientContextIdentifier
+ for contextId values.
+
+ * Headers.cmake:
+ * WebCore.xcodeproj/project.pbxproj:
+ - Add PlaybackTargetClientContextIdentifier.h to the project.
+
+ * Modules/mediasession/PlaybackTargetClientContextIdentifier.h: Add.
+ * Modules/mediasession/WebMediaSessionManager.cpp:
+ (WebCore::ClientState::ClientState):
+ (WebCore::WebMediaSessionLogger::logAlways const):
+ (WebCore::WebMediaSessionManager::addPlaybackTargetPickerClient):
+ (WebCore::WebMediaSessionManager::removePlaybackTargetPickerClient):
+ (WebCore::WebMediaSessionManager::showPlaybackTargetPicker):
+ (WebCore::WebMediaSessionManager::clientStateDidChange):
+ (WebCore::WebMediaSessionManager::find):
+ * Modules/mediasession/WebMediaSessionManager.h:
+ * Modules/mediasession/WebMediaSessionManagerClient.h:
+ * dom/Document.cpp:
+ (WebCore::Document::addPlaybackTargetPickerClient):
+ (WebCore::Document::removePlaybackTargetPickerClient):
+ (WebCore::Document::playbackTargetAvailabilityDidChange):
+ (WebCore::Document::setPlaybackTarget):
+ (WebCore::Document::setShouldPlayToPlaybackTarget):
+ (WebCore::Document::playbackTargetPickerWasDismissed):
+ (WebCore::nextPlaybackTargetClientContextId): Delete.
+ - Replace with PlaybackTargetClientContextIdentifier::generate().
+ * dom/Document.h:
+ * page/ChromeClient.h:
+ (WebCore::ChromeClient::addPlaybackTargetPickerClient):
+ (WebCore::ChromeClient::removePlaybackTargetPickerClient):
+ (WebCore::ChromeClient::showPlaybackTargetPicker):
+ (WebCore::ChromeClient::playbackTargetPickerClientStateDidChange):
+ * page/Page.cpp:
+ (WebCore::Page::addPlaybackTargetPickerClient):
+ (WebCore::Page::removePlaybackTargetPickerClient):
+ (WebCore::Page::showPlaybackTargetPicker):
+ (WebCore::Page::playbackTargetPickerClientStateDidChange):
+ (WebCore::Page::setPlaybackTarget):
+ (WebCore::Page::playbackTargetAvailabilityDidChange):
+ (WebCore::Page::setShouldPlayToPlaybackTarget):
+ (WebCore::Page::playbackTargetPickerWasDismissed):
+ * page/Page.h:
+
2020-06-24 Clark Wang <[email protected]>
Removed unrestricted keyword from attributes in PannerNode
Modified: trunk/Source/WebCore/Headers.cmake (263497 => 263498)
--- trunk/Source/WebCore/Headers.cmake 2020-06-25 03:58:07 UTC (rev 263497)
+++ trunk/Source/WebCore/Headers.cmake 2020-06-25 04:25:05 UTC (rev 263498)
@@ -89,6 +89,7 @@
Modules/mediasession/MediaSessionEvents.h
Modules/mediasession/MediaSessionMetadata.h
+ Modules/mediasession/PlaybackTargetClientContextIdentifier.h
Modules/mediasession/WebMediaSessionManager.h
Modules/mediasession/WebMediaSessionManagerClient.h
Copied: trunk/Source/WebCore/Modules/mediasession/PlaybackTargetClientContextIdentifier.h (from rev 263497, trunk/Source/WebCore/Modules/mediasession/WebMediaSessionManagerClient.h) (0 => 263498)
--- trunk/Source/WebCore/Modules/mediasession/PlaybackTargetClientContextIdentifier.h (rev 0)
+++ trunk/Source/WebCore/Modules/mediasession/PlaybackTargetClientContextIdentifier.h 2020-06-25 04:25:05 UTC (rev 263498)
@@ -0,0 +1,39 @@
+/*
+ * Copyright (C) 2020 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS 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 APPLE INC. OR ITS 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>
+
+#if ENABLE(WIRELESS_PLAYBACK_TARGET)
+
+namespace WebCore {
+
+enum PlaybackTargetClientContextIdentifierType { };
+using PlaybackTargetClientContextIdentifier = ObjectIdentifier<PlaybackTargetClientContextIdentifierType>;
+
+}
+
+#endif // ENABLE(WIRELESS_PLAYBACK_TARGET)
Modified: trunk/Source/WebCore/Modules/mediasession/WebMediaSessionManager.cpp (263497 => 263498)
--- trunk/Source/WebCore/Modules/mediasession/WebMediaSessionManager.cpp 2020-06-25 03:58:07 UTC (rev 263497)
+++ trunk/Source/WebCore/Modules/mediasession/WebMediaSessionManager.cpp 2020-06-25 04:25:05 UTC (rev 263498)
@@ -45,7 +45,7 @@
struct ClientState {
WTF_MAKE_STRUCT_FAST_ALLOCATED;
- explicit ClientState(WebMediaSessionManagerClient& client, uint64_t contextId)
+ explicit ClientState(WebMediaSessionManagerClient& client, PlaybackTargetClientContextIdentifier contextId)
: client(client)
, contextId(contextId)
{
@@ -57,7 +57,7 @@
}
WebMediaSessionManagerClient& client;
- uint64_t contextId { 0 };
+ PlaybackTargetClientContextIdentifier contextId;
WebCore::MediaProducer::MediaStateFlags flags { WebCore::MediaProducer::IsNotPlaying };
bool requestedPicker { false };
bool previouslyRequestedPicker { false };
@@ -113,7 +113,7 @@
if (!state->client.alwaysOnLoggingAllowed())
return;
- m_logger->logAlways(LogMedia, makeString("WebMediaSessionManager::", methodName, ' '), state->contextId, state->flags, arguments...);
+ m_logger->logAlways(LogMedia, makeString("WebMediaSessionManager::", methodName, ' '), state->contextId.toUInt64(), state->flags, arguments...);
}
template<typename... Arguments>
@@ -197,14 +197,14 @@
WebMediaSessionManager::~WebMediaSessionManager() = default;
-uint64_t WebMediaSessionManager::addPlaybackTargetPickerClient(WebMediaSessionManagerClient& client, uint64_t contextId)
+PlaybackTargetClientContextIdentifier WebMediaSessionManager::addPlaybackTargetPickerClient(WebMediaSessionManagerClient& client, PlaybackTargetClientContextIdentifier contextId)
{
size_t index = find(&client, contextId);
ASSERT(index == notFound);
if (index != notFound)
- return 0;
+ return { };
- ALWAYS_LOG_MEDIASESSIONMANAGER(__func__, contextId);
+ ALWAYS_LOG_MEDIASESSIONMANAGER(__func__, contextId.toUInt64());
m_clientState.append(makeUnique<ClientState>(client, contextId));
if (m_externalOutputDeviceAvailable || m_playbackTarget)
@@ -213,7 +213,7 @@
return contextId;
}
-void WebMediaSessionManager::removePlaybackTargetPickerClient(WebMediaSessionManagerClient& client, uint64_t contextId)
+void WebMediaSessionManager::removePlaybackTargetPickerClient(WebMediaSessionManagerClient& client, PlaybackTargetClientContextIdentifier contextId)
{
size_t index = find(&client, contextId);
ASSERT(index != notFound);
@@ -240,7 +240,7 @@
scheduleDelayedTask(TargetMonitoringConfigurationTask | TargetClientsConfigurationTask);
}
-void WebMediaSessionManager::showPlaybackTargetPicker(WebMediaSessionManagerClient& client, uint64_t contextId, const IntRect& rect, bool, bool useDarkAppearance)
+void WebMediaSessionManager::showPlaybackTargetPicker(WebMediaSessionManagerClient& client, PlaybackTargetClientContextIdentifier contextId, const IntRect& rect, bool, bool useDarkAppearance)
{
size_t index = find(&client, contextId);
ASSERT(index != notFound);
@@ -259,7 +259,7 @@
targetPicker().showPlaybackTargetPicker(FloatRect(rect), hasActiveRoute, useDarkAppearance);
}
-void WebMediaSessionManager::clientStateDidChange(WebMediaSessionManagerClient& client, uint64_t contextId, MediaProducer::MediaStateFlags newFlags)
+void WebMediaSessionManager::clientStateDidChange(WebMediaSessionManagerClient& client, PlaybackTargetClientContextIdentifier contextId, MediaProducer::MediaStateFlags newFlags)
{
size_t index = find(&client, contextId);
ASSERT(index != notFound);
@@ -469,7 +469,7 @@
m_taskFlags = NoTask;
}
-size_t WebMediaSessionManager::find(WebMediaSessionManagerClient* client, uint64_t contextId)
+size_t WebMediaSessionManager::find(WebMediaSessionManagerClient* client, PlaybackTargetClientContextIdentifier contextId)
{
for (size_t i = 0; i < m_clientState.size(); ++i) {
if (m_clientState[i]->contextId == contextId && &m_clientState[i]->client == client)
Modified: trunk/Source/WebCore/Modules/mediasession/WebMediaSessionManager.h (263497 => 263498)
--- trunk/Source/WebCore/Modules/mediasession/WebMediaSessionManager.h 2020-06-25 03:58:07 UTC (rev 263497)
+++ trunk/Source/WebCore/Modules/mediasession/WebMediaSessionManager.h 2020-06-25 04:25:05 UTC (rev 263498)
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2015 Apple Inc. All rights reserved.
+ * Copyright (C) 2015-2020 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -31,6 +31,7 @@
#include "MediaPlaybackTargetPicker.h"
#include "MediaPlaybackTargetPickerMock.h"
#include "MediaProducer.h"
+#include "PlaybackTargetClientContextIdentifier.h"
#include <wtf/Ref.h>
#include <wtf/RefPtr.h>
#include <wtf/RunLoop.h>
@@ -52,11 +53,11 @@
WEBCORE_EXPORT void setMockMediaPlaybackTargetPickerState(const String&, MediaPlaybackTargetContext::State);
WEBCORE_EXPORT void mockMediaPlaybackTargetPickerDismissPopup();
- WEBCORE_EXPORT uint64_t addPlaybackTargetPickerClient(WebMediaSessionManagerClient&, uint64_t);
- WEBCORE_EXPORT void removePlaybackTargetPickerClient(WebMediaSessionManagerClient&, uint64_t);
+ WEBCORE_EXPORT PlaybackTargetClientContextIdentifier addPlaybackTargetPickerClient(WebMediaSessionManagerClient&, PlaybackTargetClientContextIdentifier);
+ WEBCORE_EXPORT void removePlaybackTargetPickerClient(WebMediaSessionManagerClient&, PlaybackTargetClientContextIdentifier);
WEBCORE_EXPORT void removeAllPlaybackTargetPickerClients(WebMediaSessionManagerClient&);
- WEBCORE_EXPORT void showPlaybackTargetPicker(WebMediaSessionManagerClient&, uint64_t, const IntRect&, bool, bool);
- WEBCORE_EXPORT void clientStateDidChange(WebMediaSessionManagerClient&, uint64_t, WebCore::MediaProducer::MediaStateFlags);
+ WEBCORE_EXPORT void showPlaybackTargetPicker(WebMediaSessionManagerClient&, PlaybackTargetClientContextIdentifier, const IntRect&, bool, bool);
+ WEBCORE_EXPORT void clientStateDidChange(WebMediaSessionManagerClient&, PlaybackTargetClientContextIdentifier, WebCore::MediaProducer::MediaStateFlags);
bool alwaysOnLoggingAllowed() const;
@@ -77,7 +78,7 @@
void externalOutputDeviceAvailableDidChange(bool) override;
void playbackTargetPickerWasDismissed() override;
- size_t find(WebMediaSessionManagerClient*, uint64_t);
+ size_t find(WebMediaSessionManagerClient*, PlaybackTargetClientContextIdentifier);
void configurePlaybackTargetClients();
void configureNewClients();
Modified: trunk/Source/WebCore/Modules/mediasession/WebMediaSessionManagerClient.h (263497 => 263498)
--- trunk/Source/WebCore/Modules/mediasession/WebMediaSessionManagerClient.h 2020-06-25 03:58:07 UTC (rev 263497)
+++ trunk/Source/WebCore/Modules/mediasession/WebMediaSessionManagerClient.h 2020-06-25 04:25:05 UTC (rev 263498)
@@ -29,6 +29,7 @@
#include "MediaPlaybackTarget.h"
#include "MediaProducer.h"
+#include "PlaybackTargetClientContextIdentifier.h"
#include <wtf/Ref.h>
namespace WebCore {
@@ -37,10 +38,10 @@
public:
virtual ~WebMediaSessionManagerClient() = default;
- virtual void setPlaybackTarget(uint64_t, Ref<MediaPlaybackTarget>&&) = 0;
- virtual void externalOutputDeviceAvailableDidChange(uint64_t, bool) = 0;
- virtual void setShouldPlayToPlaybackTarget(uint64_t, bool) = 0;
- virtual void playbackTargetPickerWasDismissed(uint64_t) = 0;
+ virtual void setPlaybackTarget(PlaybackTargetClientContextIdentifier, Ref<MediaPlaybackTarget>&&) = 0;
+ virtual void externalOutputDeviceAvailableDidChange(PlaybackTargetClientContextIdentifier, bool) = 0;
+ virtual void setShouldPlayToPlaybackTarget(PlaybackTargetClientContextIdentifier, bool) = 0;
+ virtual void playbackTargetPickerWasDismissed(PlaybackTargetClientContextIdentifier) = 0;
virtual bool alwaysOnLoggingAllowed() { return false; }
};
Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (263497 => 263498)
--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2020-06-25 03:58:07 UTC (rev 263497)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2020-06-25 04:25:05 UTC (rev 263498)
@@ -1194,6 +1194,7 @@
4415292E0E1AE8A000C4A2D0 /* HTMLPlugInImageElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 4415292C0E1AE8A000C4A2D0 /* HTMLPlugInImageElement.h */; settings = {ATTRIBUTES = (Private, ); }; };
445775E520472F73008DCE5D /* LocalDefaultSystemAppearance.h in Headers */ = {isa = PBXBuildFile; fileRef = 445775E420472F73008DCE5D /* LocalDefaultSystemAppearance.h */; settings = {ATTRIBUTES = (Private, ); }; };
4463CF682212FA68001A8577 /* DataDetectorsCoreSoftLink.mm in Sources */ = {isa = PBXBuildFile; fileRef = 7C7941E21C56C29300A4C58E /* DataDetectorsCoreSoftLink.mm */; };
+ 446DC64824A29DAB0061F390 /* PlaybackTargetClientContextIdentifier.h in Headers */ = {isa = PBXBuildFile; fileRef = 446DC64624A29D9B0061F390 /* PlaybackTargetClientContextIdentifier.h */; settings = {ATTRIBUTES = (Private, ); }; };
4471710E205AF945000A116E /* MediaQueryParserContext.h in Headers */ = {isa = PBXBuildFile; fileRef = 4471710C205AF945000A116E /* MediaQueryParserContext.h */; settings = {ATTRIBUTES = (Private, ); }; };
447958041643B49A001E0A7F /* ParsedContentType.h in Headers */ = {isa = PBXBuildFile; fileRef = 447958031643B47B001E0A7F /* ParsedContentType.h */; settings = {ATTRIBUTES = (Private, ); }; };
448A29BF0A46D9CB0030759F /* JSHTMLOptionsCollection.h in Headers */ = {isa = PBXBuildFile; fileRef = 448A29BD0A46D9CB0030759F /* JSHTMLOptionsCollection.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -7756,6 +7757,7 @@
444D4E210F708B2E003158E0 /* WebCoreURLResponseIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebCoreURLResponseIOS.mm; sourceTree = "<group>"; };
445775E420472F73008DCE5D /* LocalDefaultSystemAppearance.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LocalDefaultSystemAppearance.h; sourceTree = "<group>"; };
445775E92047303B008DCE5D /* LocalDefaultSystemAppearance.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = LocalDefaultSystemAppearance.mm; sourceTree = "<group>"; };
+ 446DC64624A29D9B0061F390 /* PlaybackTargetClientContextIdentifier.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PlaybackTargetClientContextIdentifier.h; sourceTree = "<group>"; };
4471710B205AF945000A116E /* MediaQueryParserContext.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = MediaQueryParserContext.cpp; sourceTree = "<group>"; };
4471710C205AF945000A116E /* MediaQueryParserContext.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MediaQueryParserContext.h; sourceTree = "<group>"; };
447958021643B47B001E0A7F /* ParsedContentType.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ParsedContentType.cpp; sourceTree = "<group>"; };
@@ -16384,6 +16386,7 @@
C90F65531B225396002163A1 /* MediaSessionManager.cpp */,
C90F65541B225396002163A1 /* MediaSessionManager.h */,
C9D851EE1B39DC780085062E /* MediaSessionMetadata.h */,
+ 446DC64624A29D9B0061F390 /* PlaybackTargetClientContextIdentifier.h */,
0709D78C1AE55554004E42F8 /* WebMediaSessionManager.cpp */,
0709D78D1AE55554004E42F8 /* WebMediaSessionManager.h */,
0709D7941AE55A29004E42F8 /* WebMediaSessionManagerClient.h */,
@@ -32583,6 +32586,7 @@
CDA29A171CBDA56C00901CCF /* PlaybackSessionInterfaceMac.h in Headers */,
CDA29A0B1CBD9A7400901CCF /* PlaybackSessionModel.h in Headers */,
CDA29A0F1CBD9CFE00901CCF /* PlaybackSessionModelMediaElement.h in Headers */,
+ 446DC64824A29DAB0061F390 /* PlaybackTargetClientContextIdentifier.h in Headers */,
1AFFC4591D5E866100267A66 /* PluginBlocklist.h in Headers */,
31D591B316697A6C00E6BF02 /* PlugInClient.h in Headers */,
A9C6E4F40D745E48006442E9 /* PluginData.h in Headers */,
Modified: trunk/Source/WebCore/dom/Document.cpp (263497 => 263498)
--- trunk/Source/WebCore/dom/Document.cpp 2020-06-25 03:58:07 UTC (rev 263497)
+++ trunk/Source/WebCore/dom/Document.cpp 2020-06-25 04:25:05 UTC (rev 263498)
@@ -3,7 +3,7 @@
* (C) 1999 Antti Koivisto ([email protected])
* (C) 2001 Dirk Mueller ([email protected])
* (C) 2006 Alexey Proskuryakov ([email protected])
- * Copyright (C) 2004-2019 Apple Inc. All rights reserved.
+ * Copyright (C) 2004-2020 Apple Inc. All rights reserved.
* Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmobile.com/)
* Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved.
* Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
@@ -7336,12 +7336,6 @@
#if ENABLE(WIRELESS_PLAYBACK_TARGET)
-static uint64_t nextPlaybackTargetClientContextId()
-{
- static uint64_t contextId = 0;
- return ++contextId;
-}
-
void Document::addPlaybackTargetPickerClient(MediaPlaybackTargetClient& client)
{
Page* page = this->page();
@@ -7352,7 +7346,7 @@
if (m_clientToIDMap.contains(&client))
return;
- uint64_t contextId = nextPlaybackTargetClientContextId();
+ auto contextId = PlaybackTargetClientContextIdentifier::generate();
m_clientToIDMap.add(&client, contextId);
m_idToClientMap.add(contextId, &client);
page->addPlaybackTargetPickerClient(contextId);
@@ -7364,7 +7358,7 @@
if (it == m_clientToIDMap.end())
return;
- uint64_t clientId = it->value;
+ auto clientId = it->value;
m_idToClientMap.remove(clientId);
m_clientToIDMap.remove(it);
@@ -7405,9 +7399,9 @@
page->playbackTargetPickerClientStateDidChange(it->value, state);
}
-void Document::playbackTargetAvailabilityDidChange(uint64_t clientId, bool available)
+void Document::playbackTargetAvailabilityDidChange(PlaybackTargetClientContextIdentifier contextId, bool available)
{
- auto it = m_idToClientMap.find(clientId);
+ auto it = m_idToClientMap.find(contextId);
if (it == m_idToClientMap.end())
return;
@@ -7414,9 +7408,9 @@
it->value->externalOutputDeviceAvailableDidChange(available);
}
-void Document::setPlaybackTarget(uint64_t clientId, Ref<MediaPlaybackTarget>&& target)
+void Document::setPlaybackTarget(PlaybackTargetClientContextIdentifier contextId, Ref<MediaPlaybackTarget>&& target)
{
- auto it = m_idToClientMap.find(clientId);
+ auto it = m_idToClientMap.find(contextId);
if (it == m_idToClientMap.end())
return;
@@ -7423,9 +7417,9 @@
it->value->setPlaybackTarget(target.copyRef());
}
-void Document::setShouldPlayToPlaybackTarget(uint64_t clientId, bool shouldPlay)
+void Document::setShouldPlayToPlaybackTarget(PlaybackTargetClientContextIdentifier contextId, bool shouldPlay)
{
- auto it = m_idToClientMap.find(clientId);
+ auto it = m_idToClientMap.find(contextId);
if (it == m_idToClientMap.end())
return;
@@ -7432,9 +7426,9 @@
it->value->setShouldPlayToPlaybackTarget(shouldPlay);
}
-void Document::playbackTargetPickerWasDismissed(uint64_t clientId)
+void Document::playbackTargetPickerWasDismissed(PlaybackTargetClientContextIdentifier contextId)
{
- auto it = m_idToClientMap.find(clientId);
+ auto it = m_idToClientMap.find(contextId);
if (it == m_idToClientMap.end())
return;
Modified: trunk/Source/WebCore/dom/Document.h (263497 => 263498)
--- trunk/Source/WebCore/dom/Document.h 2020-06-25 03:58:07 UTC (rev 263497)
+++ trunk/Source/WebCore/dom/Document.h 2020-06-25 04:25:05 UTC (rev 263498)
@@ -48,6 +48,7 @@
#include "OrientationNotifier.h"
#include "PageIdentifier.h"
#include "PlatformEvent.h"
+#include "PlaybackTargetClientContextIdentifier.h"
#include "ReferrerPolicy.h"
#include "Region.h"
#include "RegistrableDomain.h"
@@ -1397,10 +1398,10 @@
void showPlaybackTargetPicker(MediaPlaybackTargetClient&, bool, RouteSharingPolicy, const String&);
void playbackTargetPickerClientStateDidChange(MediaPlaybackTargetClient&, MediaProducer::MediaStateFlags);
- void setPlaybackTarget(uint64_t, Ref<MediaPlaybackTarget>&&);
- void playbackTargetAvailabilityDidChange(uint64_t, bool);
- void setShouldPlayToPlaybackTarget(uint64_t, bool);
- void playbackTargetPickerWasDismissed(uint64_t);
+ void setPlaybackTarget(PlaybackTargetClientContextIdentifier, Ref<MediaPlaybackTarget>&&);
+ void playbackTargetAvailabilityDidChange(PlaybackTargetClientContextIdentifier, bool);
+ void setShouldPlayToPlaybackTarget(PlaybackTargetClientContextIdentifier, bool);
+ void playbackTargetPickerWasDismissed(PlaybackTargetClientContextIdentifier);
#endif
ShouldOpenExternalURLsPolicy shouldOpenExternalURLsPolicyToPropagate() const;
@@ -1949,9 +1950,9 @@
HashSet<ShadowRoot*> m_inDocumentShadowRoots;
#if ENABLE(WIRELESS_PLAYBACK_TARGET)
- typedef HashMap<uint64_t, WebCore::MediaPlaybackTargetClient*> TargetIdToClientMap;
+ using TargetIdToClientMap = HashMap<PlaybackTargetClientContextIdentifier, WebCore::MediaPlaybackTargetClient*>;
TargetIdToClientMap m_idToClientMap;
- typedef HashMap<WebCore::MediaPlaybackTargetClient*, uint64_t> TargetClientToIdMap;
+ using TargetClientToIdMap = HashMap<WebCore::MediaPlaybackTargetClient*, PlaybackTargetClientContextIdentifier>;
TargetClientToIdMap m_clientToIDMap;
#endif
Modified: trunk/Source/WebCore/page/ChromeClient.h (263497 => 263498)
--- trunk/Source/WebCore/page/ChromeClient.h 2020-06-25 03:58:07 UTC (rev 263497)
+++ trunk/Source/WebCore/page/ChromeClient.h 2020-06-25 04:25:05 UTC (rev 263498)
@@ -481,10 +481,10 @@
virtual void inputElementDidResignStrongPasswordAppearance(HTMLInputElement&) { };
#if ENABLE(WIRELESS_PLAYBACK_TARGET)
- virtual void addPlaybackTargetPickerClient(uint64_t /*contextId*/) { }
- virtual void removePlaybackTargetPickerClient(uint64_t /*contextId*/) { }
- virtual void showPlaybackTargetPicker(uint64_t /*contextId*/, const IntPoint&, bool /*isVideo*/) { }
- virtual void playbackTargetPickerClientStateDidChange(uint64_t /*contextId*/, MediaProducer::MediaStateFlags) { }
+ virtual void addPlaybackTargetPickerClient(PlaybackTargetClientContextIdentifier) { }
+ virtual void removePlaybackTargetPickerClient(PlaybackTargetClientContextIdentifier) { }
+ virtual void showPlaybackTargetPicker(PlaybackTargetClientContextIdentifier, const IntPoint&, bool /*isVideo*/) { }
+ virtual void playbackTargetPickerClientStateDidChange(PlaybackTargetClientContextIdentifier, MediaProducer::MediaStateFlags) { }
virtual void setMockMediaPlaybackTargetPickerEnabled(bool) { }
virtual void setMockMediaPlaybackTargetPickerState(const String&, MediaPlaybackTargetContext::State) { }
virtual void mockMediaPlaybackTargetPickerDismissPopup() { }
Modified: trunk/Source/WebCore/page/Page.cpp (263497 => 263498)
--- trunk/Source/WebCore/page/Page.cpp 2020-06-25 03:58:07 UTC (rev 263497)
+++ trunk/Source/WebCore/page/Page.cpp 2020-06-25 04:25:05 UTC (rev 263498)
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2006-2019 Apple Inc. All rights reserved.
+ * Copyright (C) 2006-2020 Apple Inc. All rights reserved.
* Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmobile.com/)
*
* This library is free software; you can redistribute it and/or
@@ -2669,17 +2669,17 @@
}
#if ENABLE(WIRELESS_PLAYBACK_TARGET)
-void Page::addPlaybackTargetPickerClient(uint64_t contextId)
+void Page::addPlaybackTargetPickerClient(PlaybackTargetClientContextIdentifier contextId)
{
chrome().client().addPlaybackTargetPickerClient(contextId);
}
-void Page::removePlaybackTargetPickerClient(uint64_t contextId)
+void Page::removePlaybackTargetPickerClient(PlaybackTargetClientContextIdentifier contextId)
{
chrome().client().removePlaybackTargetPickerClient(contextId);
}
-void Page::showPlaybackTargetPicker(uint64_t contextId, const WebCore::IntPoint& location, bool isVideo, RouteSharingPolicy routeSharingPolicy, const String& routingContextUID)
+void Page::showPlaybackTargetPicker(PlaybackTargetClientContextIdentifier contextId, const WebCore::IntPoint& location, bool isVideo, RouteSharingPolicy routeSharingPolicy, const String& routingContextUID)
{
#if PLATFORM(IOS_FAMILY)
// FIXME: refactor iOS implementation.
@@ -2693,7 +2693,7 @@
#endif
}
-void Page::playbackTargetPickerClientStateDidChange(uint64_t contextId, MediaProducer::MediaStateFlags state)
+void Page::playbackTargetPickerClientStateDidChange(PlaybackTargetClientContextIdentifier contextId, MediaProducer::MediaStateFlags state)
{
chrome().client().playbackTargetPickerClientStateDidChange(contextId, state);
}
@@ -2713,7 +2713,7 @@
chrome().client().mockMediaPlaybackTargetPickerDismissPopup();
}
-void Page::setPlaybackTarget(uint64_t contextId, Ref<MediaPlaybackTarget>&& target)
+void Page::setPlaybackTarget(PlaybackTargetClientContextIdentifier contextId, Ref<MediaPlaybackTarget>&& target)
{
forEachDocument([&] (Document& document) {
document.setPlaybackTarget(contextId, target.copyRef());
@@ -2720,7 +2720,7 @@
});
}
-void Page::playbackTargetAvailabilityDidChange(uint64_t contextId, bool available)
+void Page::playbackTargetAvailabilityDidChange(PlaybackTargetClientContextIdentifier contextId, bool available)
{
forEachDocument([&] (Document& document) {
document.playbackTargetAvailabilityDidChange(contextId, available);
@@ -2727,17 +2727,17 @@
});
}
-void Page::setShouldPlayToPlaybackTarget(uint64_t clientId, bool shouldPlay)
+void Page::setShouldPlayToPlaybackTarget(PlaybackTargetClientContextIdentifier contextId, bool shouldPlay)
{
forEachDocument([&] (Document& document) {
- document.setShouldPlayToPlaybackTarget(clientId, shouldPlay);
+ document.setShouldPlayToPlaybackTarget(contextId, shouldPlay);
});
}
-void Page::playbackTargetPickerWasDismissed(uint64_t clientId)
+void Page::playbackTargetPickerWasDismissed(PlaybackTargetClientContextIdentifier contextId)
{
forEachDocument([&] (Document& document) {
- document.playbackTargetPickerWasDismissed(clientId);
+ document.playbackTargetPickerWasDismissed(contextId);
});
}
Modified: trunk/Source/WebCore/page/Page.h (263497 => 263498)
--- trunk/Source/WebCore/page/Page.h 2020-06-25 03:58:07 UTC (rev 263497)
+++ trunk/Source/WebCore/page/Page.h 2020-06-25 04:25:05 UTC (rev 263498)
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2006-2019 Apple Inc. All rights reserved.
+ * Copyright (C) 2006-2020 Apple Inc. All rights reserved.
* Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmobile.com/)
*
* This library is free software; you can redistribute it and/or
@@ -31,6 +31,7 @@
#include "LengthBox.h"
#include "MediaProducer.h"
#include "Pagination.h"
+#include "PlaybackTargetClientContextIdentifier.h"
#include "RTCController.h"
#include "Region.h"
#include "RegistrableDomain.h"
@@ -654,18 +655,18 @@
#endif
#if ENABLE(WIRELESS_PLAYBACK_TARGET)
- void addPlaybackTargetPickerClient(uint64_t);
- void removePlaybackTargetPickerClient(uint64_t);
- void showPlaybackTargetPicker(uint64_t, const IntPoint&, bool, RouteSharingPolicy, const String&);
- void playbackTargetPickerClientStateDidChange(uint64_t, MediaProducer::MediaStateFlags);
+ void addPlaybackTargetPickerClient(PlaybackTargetClientContextIdentifier);
+ void removePlaybackTargetPickerClient(PlaybackTargetClientContextIdentifier);
+ void showPlaybackTargetPicker(PlaybackTargetClientContextIdentifier, const IntPoint&, bool, RouteSharingPolicy, const String&);
+ void playbackTargetPickerClientStateDidChange(PlaybackTargetClientContextIdentifier, MediaProducer::MediaStateFlags);
WEBCORE_EXPORT void setMockMediaPlaybackTargetPickerEnabled(bool);
WEBCORE_EXPORT void setMockMediaPlaybackTargetPickerState(const String&, MediaPlaybackTargetContext::State);
WEBCORE_EXPORT void mockMediaPlaybackTargetPickerDismissPopup();
- WEBCORE_EXPORT void setPlaybackTarget(uint64_t, Ref<MediaPlaybackTarget>&&);
- WEBCORE_EXPORT void playbackTargetAvailabilityDidChange(uint64_t, bool);
- WEBCORE_EXPORT void setShouldPlayToPlaybackTarget(uint64_t, bool);
- WEBCORE_EXPORT void playbackTargetPickerWasDismissed(uint64_t);
+ WEBCORE_EXPORT void setPlaybackTarget(PlaybackTargetClientContextIdentifier, Ref<MediaPlaybackTarget>&&);
+ WEBCORE_EXPORT void playbackTargetAvailabilityDidChange(PlaybackTargetClientContextIdentifier, bool);
+ WEBCORE_EXPORT void setShouldPlayToPlaybackTarget(PlaybackTargetClientContextIdentifier, bool);
+ WEBCORE_EXPORT void playbackTargetPickerWasDismissed(PlaybackTargetClientContextIdentifier);
#endif
WEBCORE_EXPORT RefPtr<WheelEventTestMonitor> wheelEventTestMonitor() const;
Modified: trunk/Source/WebKit/ChangeLog (263497 => 263498)
--- trunk/Source/WebKit/ChangeLog 2020-06-25 03:58:07 UTC (rev 263497)
+++ trunk/Source/WebKit/ChangeLog 2020-06-25 04:25:05 UTC (rev 263498)
@@ -1,5 +1,44 @@
2020-06-24 David Kilzer <[email protected]>
+ Use ObjectIdentifier<>instead of WebCore::nextPlaybackTargetClientContextId() in Document.cpp
+ <https://webkit.org/b/213546>
+ <rdar://problem/61803576>
+
+ Reviewed by Youenn Fablet.
+
+ Switch from uint64_t to WebCore::PlaybackTargetClientContextIdentifier
+ for contextId values.
+
+ * Scripts/webkit/messages.py:
+ (types_that_cannot_be_forward_declared):
+ - Add WebCore::PlaybackTargetClientContextIdentifier to list.
+ * UIProcess/WebPageProxy.cpp:
+ (WebKit::WebPageProxy::addPlaybackTargetPickerClient):
+ (WebKit::WebPageProxy::removePlaybackTargetPickerClient):
+ (WebKit::WebPageProxy::showPlaybackTargetPicker):
+ (WebKit::WebPageProxy::playbackTargetPickerClientStateDidChange):
+ (WebKit::WebPageProxy::setPlaybackTarget):
+ (WebKit::WebPageProxy::externalOutputDeviceAvailableDidChange):
+ (WebKit::WebPageProxy::setShouldPlayToPlaybackTarget):
+ (WebKit::WebPageProxy::playbackTargetPickerWasDismissed):
+ * UIProcess/WebPageProxy.h:
+ * UIProcess/WebPageProxy.messages.in:
+ * WebProcess/WebCoreSupport/WebChromeClient.cpp:
+ (WebKit::WebChromeClient::addPlaybackTargetPickerClient):
+ (WebKit::WebChromeClient::removePlaybackTargetPickerClient):
+ (WebKit::WebChromeClient::showPlaybackTargetPicker):
+ (WebKit::WebChromeClient::playbackTargetPickerClientStateDidChange):
+ * WebProcess/WebCoreSupport/WebChromeClient.h:
+ * WebProcess/WebPage/WebPage.h:
+ * WebProcess/WebPage/WebPage.messages.in:
+ * WebProcess/WebPage/mac/WebPageMac.mm:
+ (WebKit::WebPage::playbackTargetSelected const):
+ (WebKit::WebPage::playbackTargetAvailabilityDidChange):
+ (WebKit::WebPage::setShouldPlayToPlaybackTarget):
+ (WebKit::WebPage::playbackTargetPickerWasDismissed):
+
+2020-06-24 David Kilzer <[email protected]>
+
[IPC] Use WebKit::LayerHostingContextID instead of uint32_t for videoLayerID
<https://webkit.org/b/213576>
<rdar://problem/61806253>
Modified: trunk/Source/WebKit/Scripts/webkit/messages.py (263497 => 263498)
--- trunk/Source/WebKit/Scripts/webkit/messages.py 2020-06-25 03:58:07 UTC (rev 263497)
+++ trunk/Source/WebKit/Scripts/webkit/messages.py 2020-06-25 04:25:05 UTC (rev 263498)
@@ -212,6 +212,7 @@
'WebCore::FetchIdentifier',
'WebCore::FrameIdentifier',
'WebCore::LibWebRTCSocketIdentifier',
+ 'WebCore::PlaybackTargetClientContextIdentifier',
'WebCore::MediaSessionIdentifier',
'WebCore::PageIdentifier',
'WebCore::PluginLoadClientPolicy',
Modified: trunk/Source/WebKit/UIProcess/WebPageProxy.cpp (263497 => 263498)
--- trunk/Source/WebKit/UIProcess/WebPageProxy.cpp 2020-06-25 03:58:07 UTC (rev 263497)
+++ trunk/Source/WebKit/UIProcess/WebPageProxy.cpp 2020-06-25 04:25:05 UTC (rev 263498)
@@ -9144,22 +9144,22 @@
}
#if ENABLE(WIRELESS_PLAYBACK_TARGET) && !PLATFORM(IOS_FAMILY)
-void WebPageProxy::addPlaybackTargetPickerClient(uint64_t contextId)
+void WebPageProxy::addPlaybackTargetPickerClient(PlaybackTargetClientContextIdentifier contextId)
{
pageClient().mediaSessionManager().addPlaybackTargetPickerClient(*this, contextId);
}
-void WebPageProxy::removePlaybackTargetPickerClient(uint64_t contextId)
+void WebPageProxy::removePlaybackTargetPickerClient(PlaybackTargetClientContextIdentifier contextId)
{
pageClient().mediaSessionManager().removePlaybackTargetPickerClient(*this, contextId);
}
-void WebPageProxy::showPlaybackTargetPicker(uint64_t contextId, const WebCore::FloatRect& rect, bool hasVideo)
+void WebPageProxy::showPlaybackTargetPicker(PlaybackTargetClientContextIdentifier contextId, const WebCore::FloatRect& rect, bool hasVideo)
{
pageClient().mediaSessionManager().showPlaybackTargetPicker(*this, contextId, pageClient().rootViewToScreen(IntRect(rect)), hasVideo, useDarkAppearance());
}
-void WebPageProxy::playbackTargetPickerClientStateDidChange(uint64_t contextId, WebCore::MediaProducer::MediaStateFlags state)
+void WebPageProxy::playbackTargetPickerClientStateDidChange(PlaybackTargetClientContextIdentifier contextId, WebCore::MediaProducer::MediaStateFlags state)
{
pageClient().mediaSessionManager().clientStateDidChange(*this, contextId, state);
}
@@ -9179,7 +9179,7 @@
pageClient().mediaSessionManager().mockMediaPlaybackTargetPickerDismissPopup();
}
-void WebPageProxy::setPlaybackTarget(uint64_t contextId, Ref<MediaPlaybackTarget>&& target)
+void WebPageProxy::setPlaybackTarget(PlaybackTargetClientContextIdentifier contextId, Ref<MediaPlaybackTarget>&& target)
{
if (!hasRunningProcess())
return;
@@ -9187,7 +9187,7 @@
send(Messages::WebPage::PlaybackTargetSelected(contextId, target->targetContext()));
}
-void WebPageProxy::externalOutputDeviceAvailableDidChange(uint64_t contextId, bool available)
+void WebPageProxy::externalOutputDeviceAvailableDidChange(PlaybackTargetClientContextIdentifier contextId, bool available)
{
if (!hasRunningProcess())
return;
@@ -9195,7 +9195,7 @@
send(Messages::WebPage::PlaybackTargetAvailabilityDidChange(contextId, available));
}
-void WebPageProxy::setShouldPlayToPlaybackTarget(uint64_t contextId, bool shouldPlay)
+void WebPageProxy::setShouldPlayToPlaybackTarget(PlaybackTargetClientContextIdentifier contextId, bool shouldPlay)
{
if (!hasRunningProcess())
return;
@@ -9203,7 +9203,7 @@
send(Messages::WebPage::SetShouldPlayToPlaybackTarget(contextId, shouldPlay));
}
-void WebPageProxy::playbackTargetPickerWasDismissed(uint64_t contextId)
+void WebPageProxy::playbackTargetPickerWasDismissed(PlaybackTargetClientContextIdentifier contextId)
{
if (!hasRunningProcess())
return;
Modified: trunk/Source/WebKit/UIProcess/WebPageProxy.h (263497 => 263498)
--- trunk/Source/WebKit/UIProcess/WebPageProxy.h 2020-06-25 03:58:07 UTC (rev 263497)
+++ trunk/Source/WebKit/UIProcess/WebPageProxy.h 2020-06-25 04:25:05 UTC (rev 263498)
@@ -1521,19 +1521,19 @@
#endif
#if ENABLE(WIRELESS_PLAYBACK_TARGET) && !PLATFORM(IOS_FAMILY)
- void addPlaybackTargetPickerClient(uint64_t);
- void removePlaybackTargetPickerClient(uint64_t);
- void showPlaybackTargetPicker(uint64_t, const WebCore::FloatRect&, bool hasVideo);
- void playbackTargetPickerClientStateDidChange(uint64_t, WebCore::MediaProducer::MediaStateFlags);
+ void addPlaybackTargetPickerClient(WebCore::PlaybackTargetClientContextIdentifier);
+ void removePlaybackTargetPickerClient(WebCore::PlaybackTargetClientContextIdentifier);
+ void showPlaybackTargetPicker(WebCore::PlaybackTargetClientContextIdentifier, const WebCore::FloatRect&, bool hasVideo);
+ void playbackTargetPickerClientStateDidChange(WebCore::PlaybackTargetClientContextIdentifier, WebCore::MediaProducer::MediaStateFlags);
void setMockMediaPlaybackTargetPickerEnabled(bool);
void setMockMediaPlaybackTargetPickerState(const String&, WebCore::MediaPlaybackTargetContext::State);
void mockMediaPlaybackTargetPickerDismissPopup();
// WebMediaSessionManagerClient
- void setPlaybackTarget(uint64_t, Ref<WebCore::MediaPlaybackTarget>&&) final;
- void externalOutputDeviceAvailableDidChange(uint64_t, bool) final;
- void setShouldPlayToPlaybackTarget(uint64_t, bool) final;
- void playbackTargetPickerWasDismissed(uint64_t) final;
+ void setPlaybackTarget(WebCore::PlaybackTargetClientContextIdentifier, Ref<WebCore::MediaPlaybackTarget>&&) final;
+ void externalOutputDeviceAvailableDidChange(WebCore::PlaybackTargetClientContextIdentifier, bool) final;
+ void setShouldPlayToPlaybackTarget(WebCore::PlaybackTargetClientContextIdentifier, bool) final;
+ void playbackTargetPickerWasDismissed(WebCore::PlaybackTargetClientContextIdentifier) final;
bool alwaysOnLoggingAllowed() final { return isAlwaysOnLoggingAllowed(); }
#endif
Modified: trunk/Source/WebKit/UIProcess/WebPageProxy.messages.in (263497 => 263498)
--- trunk/Source/WebKit/UIProcess/WebPageProxy.messages.in 2020-06-25 03:58:07 UTC (rev 263497)
+++ trunk/Source/WebKit/UIProcess/WebPageProxy.messages.in 2020-06-25 04:25:05 UTC (rev 263498)
@@ -498,10 +498,10 @@
ContentRuleListNotification(URL url, struct WebCore::ContentRuleListResults results)
#if ENABLE(WIRELESS_PLAYBACK_TARGET) && !PLATFORM(IOS_FAMILY)
- AddPlaybackTargetPickerClient(uint64_t contextId)
- RemovePlaybackTargetPickerClient(uint64_t contextId)
- ShowPlaybackTargetPicker(uint64_t clientId, WebCore::FloatRect pickerLocation, bool hasVideo)
- PlaybackTargetPickerClientStateDidChange(uint64_t contextId, unsigned mediaState)
+ AddPlaybackTargetPickerClient(WebCore::PlaybackTargetClientContextIdentifier contextId)
+ RemovePlaybackTargetPickerClient(WebCore::PlaybackTargetClientContextIdentifier contextId)
+ ShowPlaybackTargetPicker(WebCore::PlaybackTargetClientContextIdentifier contextId, WebCore::FloatRect pickerLocation, bool hasVideo)
+ PlaybackTargetPickerClientStateDidChange(WebCore::PlaybackTargetClientContextIdentifier contextId, unsigned mediaState)
SetMockMediaPlaybackTargetPickerEnabled(bool enabled)
SetMockMediaPlaybackTargetPickerState(String name, unsigned pickerState)
MockMediaPlaybackTargetPickerDismissPopup()
Modified: trunk/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp (263497 => 263498)
--- trunk/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp 2020-06-25 03:58:07 UTC (rev 263497)
+++ trunk/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp 2020-06-25 04:25:05 UTC (rev 263498)
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010-2017 Apple Inc. All rights reserved.
+ * Copyright (C) 2010-2020 Apple Inc. All rights reserved.
* Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
*
* Redistribution and use in source and binary forms, with or without
@@ -1256,17 +1256,17 @@
#if ENABLE(WIRELESS_PLAYBACK_TARGET) && !PLATFORM(IOS_FAMILY)
-void WebChromeClient::addPlaybackTargetPickerClient(uint64_t contextId)
+void WebChromeClient::addPlaybackTargetPickerClient(PlaybackTargetClientContextIdentifier contextId)
{
m_page.send(Messages::WebPageProxy::AddPlaybackTargetPickerClient(contextId));
}
-void WebChromeClient::removePlaybackTargetPickerClient(uint64_t contextId)
+void WebChromeClient::removePlaybackTargetPickerClient(PlaybackTargetClientContextIdentifier contextId)
{
m_page.send(Messages::WebPageProxy::RemovePlaybackTargetPickerClient(contextId));
}
-void WebChromeClient::showPlaybackTargetPicker(uint64_t contextId, const IntPoint& position, bool isVideo)
+void WebChromeClient::showPlaybackTargetPicker(PlaybackTargetClientContextIdentifier contextId, const IntPoint& position, bool isVideo)
{
FrameView* frameView = m_page.mainFrame()->view();
FloatRect rect(frameView->contentsToRootView(frameView->windowToContents(position)), FloatSize());
@@ -1273,7 +1273,7 @@
m_page.send(Messages::WebPageProxy::ShowPlaybackTargetPicker(contextId, rect, isVideo));
}
-void WebChromeClient::playbackTargetPickerClientStateDidChange(uint64_t contextId, MediaProducer::MediaStateFlags state)
+void WebChromeClient::playbackTargetPickerClientStateDidChange(PlaybackTargetClientContextIdentifier contextId, MediaProducer::MediaStateFlags state)
{
m_page.send(Messages::WebPageProxy::PlaybackTargetPickerClientStateDidChange(contextId, state));
}
Modified: trunk/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.h (263497 => 263498)
--- trunk/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.h 2020-06-25 03:58:07 UTC (rev 263497)
+++ trunk/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.h 2020-06-25 04:25:05 UTC (rev 263498)
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010-2017 Apple Inc. All rights reserved.
+ * Copyright (C) 2010-2020 Apple Inc. All rights reserved.
* Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
*
* Redistribution and use in source and binary forms, with or without
@@ -364,10 +364,10 @@
void inputElementDidResignStrongPasswordAppearance(WebCore::HTMLInputElement&) final;
#if ENABLE(WIRELESS_PLAYBACK_TARGET) && !PLATFORM(IOS_FAMILY)
- void addPlaybackTargetPickerClient(uint64_t /*contextId*/) final;
- void removePlaybackTargetPickerClient(uint64_t /*contextId*/) final;
- void showPlaybackTargetPicker(uint64_t contextId, const WebCore::IntPoint&, bool) final;
- void playbackTargetPickerClientStateDidChange(uint64_t, WebCore::MediaProducer::MediaStateFlags) final;
+ void addPlaybackTargetPickerClient(WebCore::PlaybackTargetClientContextIdentifier) final;
+ void removePlaybackTargetPickerClient(WebCore::PlaybackTargetClientContextIdentifier) final;
+ void showPlaybackTargetPicker(WebCore::PlaybackTargetClientContextIdentifier, const WebCore::IntPoint&, bool) final;
+ void playbackTargetPickerClientStateDidChange(WebCore::PlaybackTargetClientContextIdentifier, WebCore::MediaProducer::MediaStateFlags) final;
void setMockMediaPlaybackTargetPickerEnabled(bool) final;
void setMockMediaPlaybackTargetPickerState(const String&, WebCore::MediaPlaybackTargetContext::State) final;
void mockMediaPlaybackTargetPickerDismissPopup() final;
Modified: trunk/Source/WebKit/WebProcess/WebPage/WebPage.h (263497 => 263498)
--- trunk/Source/WebKit/WebProcess/WebPage/WebPage.h 2020-06-25 03:58:07 UTC (rev 263497)
+++ trunk/Source/WebKit/WebProcess/WebPage/WebPage.h 2020-06-25 04:25:05 UTC (rev 263498)
@@ -1685,10 +1685,10 @@
void setShouldDispatchFakeMouseMoveEvents(bool dispatch) { m_shouldDispatchFakeMouseMoveEvents = dispatch; }
#if ENABLE(WIRELESS_PLAYBACK_TARGET) && !PLATFORM(IOS_FAMILY)
- void playbackTargetSelected(uint64_t, const WebCore::MediaPlaybackTargetContext& outputDevice) const;
- void playbackTargetAvailabilityDidChange(uint64_t, bool);
- void setShouldPlayToPlaybackTarget(uint64_t, bool);
- void playbackTargetPickerWasDismissed(uint64_t);
+ void playbackTargetSelected(WebCore::PlaybackTargetClientContextIdentifier, const WebCore::MediaPlaybackTargetContext& outputDevice) const;
+ void playbackTargetAvailabilityDidChange(WebCore::PlaybackTargetClientContextIdentifier, bool);
+ void setShouldPlayToPlaybackTarget(WebCore::PlaybackTargetClientContextIdentifier, bool);
+ void playbackTargetPickerWasDismissed(WebCore::PlaybackTargetClientContextIdentifier);
#endif
void clearWheelEventTestMonitor();
Modified: trunk/Source/WebKit/WebProcess/WebPage/WebPage.messages.in (263497 => 263498)
--- trunk/Source/WebKit/WebProcess/WebPage/WebPage.messages.in 2020-06-25 03:58:07 UTC (rev 263497)
+++ trunk/Source/WebKit/WebProcess/WebPage/WebPage.messages.in 2020-06-25 04:25:05 UTC (rev 263498)
@@ -520,10 +520,10 @@
SetShouldDispatchFakeMouseMoveEvents(bool shouldDispatchFakeMouseMoveEvents)
#if ENABLE(WIRELESS_PLAYBACK_TARGET) && !PLATFORM(IOS_FAMILY)
- PlaybackTargetSelected(uint64_t contextId, WebCore::MediaPlaybackTargetContext target)
- PlaybackTargetAvailabilityDidChange(uint64_t contextId, bool available)
- SetShouldPlayToPlaybackTarget(uint64_t contextId, bool shouldPlay)
- PlaybackTargetPickerWasDismissed(uint64_t contextId);
+ PlaybackTargetSelected(WebCore::PlaybackTargetClientContextIdentifier contextId, WebCore::MediaPlaybackTargetContext target)
+ PlaybackTargetAvailabilityDidChange(WebCore::PlaybackTargetClientContextIdentifier contextId, bool available)
+ SetShouldPlayToPlaybackTarget(WebCore::PlaybackTargetClientContextIdentifier contextId, bool shouldPlay)
+ PlaybackTargetPickerWasDismissed(WebCore::PlaybackTargetClientContextIdentifier contextId);
#endif
#if ENABLE(POINTER_LOCK)
Modified: trunk/Source/WebKit/WebProcess/WebPage/mac/WebPageMac.mm (263497 => 263498)
--- trunk/Source/WebKit/WebProcess/WebPage/mac/WebPageMac.mm 2020-06-25 03:58:07 UTC (rev 263497)
+++ trunk/Source/WebKit/WebProcess/WebPage/mac/WebPageMac.mm 2020-06-25 04:25:05 UTC (rev 263498)
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010-2017 Apple Inc. All rights reserved.
+ * Copyright (C) 2010-2020 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -1008,7 +1008,7 @@
}
#if ENABLE(WIRELESS_PLAYBACK_TARGET) && !PLATFORM(IOS_FAMILY)
-void WebPage::playbackTargetSelected(uint64_t contextId, const WebCore::MediaPlaybackTargetContext& targetContext) const
+void WebPage::playbackTargetSelected(PlaybackTargetClientContextIdentifier contextId, const WebCore::MediaPlaybackTargetContext& targetContext) const
{
switch (targetContext.type()) {
case MediaPlaybackTargetContext::AVOutputContextType:
@@ -1023,17 +1023,17 @@
}
}
-void WebPage::playbackTargetAvailabilityDidChange(uint64_t contextId, bool changed)
+void WebPage::playbackTargetAvailabilityDidChange(PlaybackTargetClientContextIdentifier contextId, bool changed)
{
m_page->playbackTargetAvailabilityDidChange(contextId, changed);
}
-void WebPage::setShouldPlayToPlaybackTarget(uint64_t contextId, bool shouldPlay)
+void WebPage::setShouldPlayToPlaybackTarget(PlaybackTargetClientContextIdentifier contextId, bool shouldPlay)
{
m_page->setShouldPlayToPlaybackTarget(contextId, shouldPlay);
}
-void WebPage::playbackTargetPickerWasDismissed(uint64_t contextId)
+void WebPage::playbackTargetPickerWasDismissed(PlaybackTargetClientContextIdentifier contextId)
{
m_page->playbackTargetPickerWasDismissed(contextId);
}
Modified: trunk/Source/WebKitLegacy/mac/ChangeLog (263497 => 263498)
--- trunk/Source/WebKitLegacy/mac/ChangeLog 2020-06-25 03:58:07 UTC (rev 263497)
+++ trunk/Source/WebKitLegacy/mac/ChangeLog 2020-06-25 04:25:05 UTC (rev 263498)
@@ -1,3 +1,37 @@
+2020-06-24 David Kilzer <[email protected]>
+
+ Use ObjectIdentifier<>instead of WebCore::nextPlaybackTargetClientContextId() in Document.cpp
+ <https://webkit.org/b/213546>
+ <rdar://problem/61803576>
+
+ Reviewed by Youenn Fablet.
+
+ Switch from uint64_t to WebCore::PlaybackTargetClientContextIdentifier
+ for contextId values.
+
+ * WebCoreSupport/WebChromeClient.h:
+ * WebCoreSupport/WebChromeClient.mm:
+ (WebChromeClient::addPlaybackTargetPickerClient):
+ (WebChromeClient::removePlaybackTargetPickerClient):
+ (WebChromeClient::showPlaybackTargetPicker):
+ (WebChromeClient::playbackTargetPickerClientStateDidChange):
+ * WebView/WebMediaPlaybackTargetPicker.h:
+ * WebView/WebMediaPlaybackTargetPicker.mm:
+ (WebMediaPlaybackTargetPicker::addPlaybackTargetPickerClient):
+ (WebMediaPlaybackTargetPicker::removePlaybackTargetPickerClient):
+ (WebMediaPlaybackTargetPicker::showPlaybackTargetPicker):
+ (WebMediaPlaybackTargetPicker::playbackTargetPickerClientStateDidChange):
+ (WebMediaPlaybackTargetPicker::setPlaybackTarget):
+ (WebMediaPlaybackTargetPicker::externalOutputDeviceAvailableDidChange):
+ (WebMediaPlaybackTargetPicker::setShouldPlayToPlaybackTarget):
+ (WebMediaPlaybackTargetPicker::playbackTargetPickerWasDismissed):
+ * WebView/WebView.mm:
+ (-[WebView _addPlaybackTargetPickerClient:]):
+ (-[WebView _removePlaybackTargetPickerClient:]):
+ (-[WebView _showPlaybackTargetPicker:location:hasVideo:]):
+ (-[WebView _playbackTargetPickerClientStateDidChange:state:]):
+ * WebView/WebViewInternal.h:
+
2020-06-24 Umar Iqbal <[email protected]>
We should resurrect the older patch that collects some statistics of web API calls
Modified: trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebChromeClient.h (263497 => 263498)
--- trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebChromeClient.h 2020-06-25 03:58:07 UTC (rev 263497)
+++ trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebChromeClient.h 2020-06-25 04:25:05 UTC (rev 263498)
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2006-2017 Apple Inc. All rights reserved.
+ * Copyright (C) 2006-2020 Apple Inc. All rights reserved.
* Copyright (C) 2008, 2010 Nokia Corporation and/or its subsidiary(-ies)
*
* Redistribution and use in source and binary forms, with or without
@@ -225,10 +225,10 @@
#endif
#if ENABLE(WIRELESS_PLAYBACK_TARGET) && !PLATFORM(IOS_FAMILY)
- void addPlaybackTargetPickerClient(uint64_t /*contextId*/) final;
- void removePlaybackTargetPickerClient(uint64_t /*contextId*/) final;
- void showPlaybackTargetPicker(uint64_t /*contextId*/, const WebCore::IntPoint&, bool /* hasVideo */) final;
- void playbackTargetPickerClientStateDidChange(uint64_t /*contextId*/, WebCore::MediaProducer::MediaStateFlags) final;
+ void addPlaybackTargetPickerClient(WebCore::PlaybackTargetClientContextIdentifier) final;
+ void removePlaybackTargetPickerClient(WebCore::PlaybackTargetClientContextIdentifier) final;
+ void showPlaybackTargetPicker(WebCore::PlaybackTargetClientContextIdentifier, const WebCore::IntPoint&, bool /* hasVideo */) final;
+ void playbackTargetPickerClientStateDidChange(WebCore::PlaybackTargetClientContextIdentifier, WebCore::MediaProducer::MediaStateFlags) final;
void setMockMediaPlaybackTargetPickerEnabled(bool) final;
void setMockMediaPlaybackTargetPickerState(const String&, WebCore::MediaPlaybackTargetContext::State) final;
void mockMediaPlaybackTargetPickerDismissPopup() override;
Modified: trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebChromeClient.mm (263497 => 263498)
--- trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebChromeClient.mm 2020-06-25 03:58:07 UTC (rev 263497)
+++ trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebChromeClient.mm 2020-06-25 04:25:05 UTC (rev 263498)
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2006-2017 Apple Inc. All rights reserved.
+ * Copyright (C) 2006-2020 Apple Inc. All rights reserved.
* Copyright (C) 2008, 2010 Nokia Corporation and/or its subsidiary(-ies)
*
* Redistribution and use in source and binary forms, with or without
@@ -1113,22 +1113,22 @@
#if ENABLE(WIRELESS_PLAYBACK_TARGET) && !PLATFORM(IOS_FAMILY)
-void WebChromeClient::addPlaybackTargetPickerClient(uint64_t contextId)
+void WebChromeClient::addPlaybackTargetPickerClient(PlaybackTargetClientContextIdentifier contextId)
{
[m_webView _addPlaybackTargetPickerClient:contextId];
}
-void WebChromeClient::removePlaybackTargetPickerClient(uint64_t contextId)
+void WebChromeClient::removePlaybackTargetPickerClient(PlaybackTargetClientContextIdentifier contextId)
{
[m_webView _removePlaybackTargetPickerClient:contextId];
}
-void WebChromeClient::showPlaybackTargetPicker(uint64_t contextId, const WebCore::IntPoint& location, bool hasVideo)
+void WebChromeClient::showPlaybackTargetPicker(PlaybackTargetClientContextIdentifier contextId, const WebCore::IntPoint& location, bool hasVideo)
{
[m_webView _showPlaybackTargetPicker:contextId location:location hasVideo:hasVideo];
}
-void WebChromeClient::playbackTargetPickerClientStateDidChange(uint64_t contextId, MediaProducer::MediaStateFlags state)
+void WebChromeClient::playbackTargetPickerClientStateDidChange(PlaybackTargetClientContextIdentifier contextId, MediaProducer::MediaStateFlags state)
{
[m_webView _playbackTargetPickerClientStateDidChange:contextId state:state];
}
Modified: trunk/Source/WebKitLegacy/mac/WebView/WebMediaPlaybackTargetPicker.h (263497 => 263498)
--- trunk/Source/WebKitLegacy/mac/WebView/WebMediaPlaybackTargetPicker.h 2020-06-25 03:58:07 UTC (rev 263497)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebMediaPlaybackTargetPicker.h 2020-06-25 04:25:05 UTC (rev 263498)
@@ -46,19 +46,19 @@
explicit WebMediaPlaybackTargetPicker(WebCore::Page&);
virtual ~WebMediaPlaybackTargetPicker() { }
- void addPlaybackTargetPickerClient(uint64_t);
- void removePlaybackTargetPickerClient(uint64_t);
- void showPlaybackTargetPicker(uint64_t, const WebCore::FloatRect&, bool hasVideo);
- void playbackTargetPickerClientStateDidChange(uint64_t, WebCore::MediaProducer::MediaStateFlags);
+ void addPlaybackTargetPickerClient(WebCore::PlaybackTargetClientContextIdentifier);
+ void removePlaybackTargetPickerClient(WebCore::PlaybackTargetClientContextIdentifier);
+ void showPlaybackTargetPicker(WebCore::PlaybackTargetClientContextIdentifier, const WebCore::FloatRect&, bool hasVideo);
+ void playbackTargetPickerClientStateDidChange(WebCore::PlaybackTargetClientContextIdentifier, WebCore::MediaProducer::MediaStateFlags);
void setMockMediaPlaybackTargetPickerEnabled(bool);
void setMockMediaPlaybackTargetPickerState(const String&, WebCore::MediaPlaybackTargetContext::State);
void mockMediaPlaybackTargetPickerDismissPopup();
// WebMediaSessionManagerClient
- void setPlaybackTarget(uint64_t, Ref<WebCore::MediaPlaybackTarget>&&) override;
- void externalOutputDeviceAvailableDidChange(uint64_t, bool) override;
- void setShouldPlayToPlaybackTarget(uint64_t, bool) override;
- void playbackTargetPickerWasDismissed(uint64_t) override;
+ void setPlaybackTarget(WebCore::PlaybackTargetClientContextIdentifier, Ref<WebCore::MediaPlaybackTarget>&&) override;
+ void externalOutputDeviceAvailableDidChange(WebCore::PlaybackTargetClientContextIdentifier, bool) override;
+ void setShouldPlayToPlaybackTarget(WebCore::PlaybackTargetClientContextIdentifier, bool) override;
+ void playbackTargetPickerWasDismissed(WebCore::PlaybackTargetClientContextIdentifier) override;
void invalidate();
Modified: trunk/Source/WebKitLegacy/mac/WebView/WebMediaPlaybackTargetPicker.mm (263497 => 263498)
--- trunk/Source/WebKitLegacy/mac/WebView/WebMediaPlaybackTargetPicker.mm 2020-06-25 03:58:07 UTC (rev 263497)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebMediaPlaybackTargetPicker.mm 2020-06-25 04:25:05 UTC (rev 263498)
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2015 Apple Inc. All rights reserved.
+ * Copyright (C) 2015-2020 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -41,22 +41,22 @@
{
}
-void WebMediaPlaybackTargetPicker::addPlaybackTargetPickerClient(uint64_t contextId)
+void WebMediaPlaybackTargetPicker::addPlaybackTargetPickerClient(WebCore::PlaybackTargetClientContextIdentifier contextId)
{
WebCore::WebMediaSessionManager::shared().addPlaybackTargetPickerClient(*this, contextId);
}
-void WebMediaPlaybackTargetPicker::removePlaybackTargetPickerClient(uint64_t contextId)
+void WebMediaPlaybackTargetPicker::removePlaybackTargetPickerClient(WebCore::PlaybackTargetClientContextIdentifier contextId)
{
WebCore::WebMediaSessionManager::shared().removePlaybackTargetPickerClient(*this, contextId);
}
-void WebMediaPlaybackTargetPicker::showPlaybackTargetPicker(uint64_t contextId, const WebCore::FloatRect& rect, bool hasVideo)
+void WebMediaPlaybackTargetPicker::showPlaybackTargetPicker(WebCore::PlaybackTargetClientContextIdentifier contextId, const WebCore::FloatRect& rect, bool hasVideo)
{
WebCore::WebMediaSessionManager::shared().showPlaybackTargetPicker(*this, contextId, WebCore::IntRect(rect), hasVideo, m_page ? m_page->useDarkAppearance() : false);
}
-void WebMediaPlaybackTargetPicker::playbackTargetPickerClientStateDidChange(uint64_t contextId, WebCore::MediaProducer::MediaStateFlags state)
+void WebMediaPlaybackTargetPicker::playbackTargetPickerClientStateDidChange(WebCore::PlaybackTargetClientContextIdentifier contextId, WebCore::MediaProducer::MediaStateFlags state)
{
WebCore::WebMediaSessionManager::shared().clientStateDidChange(*this, contextId, state);
}
@@ -76,7 +76,7 @@
WebCore::WebMediaSessionManager::shared().mockMediaPlaybackTargetPickerDismissPopup();
}
-void WebMediaPlaybackTargetPicker::setPlaybackTarget(uint64_t contextId, Ref<WebCore::MediaPlaybackTarget>&& target)
+void WebMediaPlaybackTargetPicker::setPlaybackTarget(WebCore::PlaybackTargetClientContextIdentifier contextId, Ref<WebCore::MediaPlaybackTarget>&& target)
{
if (!m_page)
return;
@@ -84,7 +84,7 @@
m_page->setPlaybackTarget(contextId, WTFMove(target));
}
-void WebMediaPlaybackTargetPicker::externalOutputDeviceAvailableDidChange(uint64_t contextId, bool available)
+void WebMediaPlaybackTargetPicker::externalOutputDeviceAvailableDidChange(WebCore::PlaybackTargetClientContextIdentifier contextId, bool available)
{
if (!m_page)
return;
@@ -92,7 +92,7 @@
m_page->playbackTargetAvailabilityDidChange(contextId, available);
}
-void WebMediaPlaybackTargetPicker::setShouldPlayToPlaybackTarget(uint64_t contextId, bool shouldPlay)
+void WebMediaPlaybackTargetPicker::setShouldPlayToPlaybackTarget(WebCore::PlaybackTargetClientContextIdentifier contextId, bool shouldPlay)
{
if (!m_page)
return;
@@ -100,7 +100,7 @@
m_page->setShouldPlayToPlaybackTarget(contextId, shouldPlay);
}
-void WebMediaPlaybackTargetPicker::playbackTargetPickerWasDismissed(uint64_t contextId)
+void WebMediaPlaybackTargetPicker::playbackTargetPickerWasDismissed(WebCore::PlaybackTargetClientContextIdentifier contextId)
{
if (m_page)
m_page->playbackTargetPickerWasDismissed(contextId);
Modified: trunk/Source/WebKitLegacy/mac/WebView/WebView.mm (263497 => 263498)
--- trunk/Source/WebKitLegacy/mac/WebView/WebView.mm 2020-06-25 03:58:07 UTC (rev 263497)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebView.mm 2020-06-25 04:25:05 UTC (rev 263498)
@@ -9722,28 +9722,28 @@
return _private->m_playbackTargetPicker.get();
}
-- (void)_addPlaybackTargetPickerClient:(uint64_t)clientId
+- (void)_addPlaybackTargetPickerClient:(WebCore::PlaybackTargetClientContextIdentifier)contextId
{
- [self _devicePicker]->addPlaybackTargetPickerClient(clientId);
+ [self _devicePicker]->addPlaybackTargetPickerClient(contextId);
}
-- (void)_removePlaybackTargetPickerClient:(uint64_t)clientId
+- (void)_removePlaybackTargetPickerClient:(WebCore::PlaybackTargetClientContextIdentifier)contextId
{
- [self _devicePicker]->removePlaybackTargetPickerClient(clientId);
+ [self _devicePicker]->removePlaybackTargetPickerClient(contextId);
}
-- (void)_showPlaybackTargetPicker:(uint64_t)clientId location:(const WebCore::IntPoint&)location hasVideo:(BOOL)hasVideo
+- (void)_showPlaybackTargetPicker:(WebCore::PlaybackTargetClientContextIdentifier)contextId location:(const WebCore::IntPoint&)location hasVideo:(BOOL)hasVideo
{
if (!_private->page)
return;
NSRect rectInScreenCoordinates = [self.window convertRectToScreen:NSMakeRect(location.x(), location.y(), 0, 0)];
- [self _devicePicker]->showPlaybackTargetPicker(clientId, rectInScreenCoordinates, hasVideo);
+ [self _devicePicker]->showPlaybackTargetPicker(contextId, rectInScreenCoordinates, hasVideo);
}
-- (void)_playbackTargetPickerClientStateDidChange:(uint64_t)clientId state:(WebCore::MediaProducer::MediaStateFlags)state
+- (void)_playbackTargetPickerClientStateDidChange:(WebCore::PlaybackTargetClientContextIdentifier)contextId state:(WebCore::MediaProducer::MediaStateFlags)state
{
- [self _devicePicker]->playbackTargetPickerClientStateDidChange(clientId, state);
+ [self _devicePicker]->playbackTargetPickerClientStateDidChange(contextId, state);
}
- (void)_setMockMediaPlaybackTargetPickerEnabled:(bool)enabled
Modified: trunk/Source/WebKitLegacy/mac/WebView/WebViewInternal.h (263497 => 263498)
--- trunk/Source/WebKitLegacy/mac/WebView/WebViewInternal.h 2020-06-25 03:58:07 UTC (rev 263497)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebViewInternal.h 2020-06-25 04:25:05 UTC (rev 263498)
@@ -42,6 +42,7 @@
#import <WebCore/FloatRect.h>
#import <WebCore/HTMLMediaElementEnums.h>
#import <WebCore/LayoutMilestone.h>
+#import <WebCore/PlaybackTargetClientContextIdentifier.h>
#import <WebCore/TextAlternativeWithRange.h>
#import <WebCore/TextIndicator.h>
#import <WebCore/TextIndicatorWindow.h>
@@ -320,10 +321,10 @@
#if ENABLE(WIRELESS_PLAYBACK_TARGET) && !PLATFORM(IOS_FAMILY) && defined(__cplusplus)
- (WebMediaPlaybackTargetPicker *) _devicePicker;
-- (void)_addPlaybackTargetPickerClient:(uint64_t)clientId;
-- (void)_removePlaybackTargetPickerClient:(uint64_t)contextId;
-- (void)_showPlaybackTargetPicker:(uint64_t)contextId location:(const WebCore::IntPoint&)location hasVideo:(BOOL)hasVideo;
-- (void)_playbackTargetPickerClientStateDidChange:(uint64_t)contextId state:(WebCore::MediaProducer::MediaStateFlags)state;
+- (void)_addPlaybackTargetPickerClient:(WebCore::PlaybackTargetClientContextIdentifier)contextId;
+- (void)_removePlaybackTargetPickerClient:(WebCore::PlaybackTargetClientContextIdentifier)contextId;
+- (void)_showPlaybackTargetPicker:(WebCore::PlaybackTargetClientContextIdentifier)contextId location:(const WebCore::IntPoint&)location hasVideo:(BOOL)hasVideo;
+- (void)_playbackTargetPickerClientStateDidChange:(WebCore::PlaybackTargetClientContextIdentifier)contextId state:(WebCore::MediaProducer::MediaStateFlags)state;
- (void)_setMockMediaPlaybackTargetPickerEnabled:(bool)enabled;
- (void)_setMockMediaPlaybackTargetPickerName:(NSString *)name state:(WebCore::MediaPlaybackTargetContext::State)state;
- (void)_mockMediaPlaybackTargetPickerDismissPopup;