Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 7533deb1da033f11212d061fad58013f8dc401fb
      
https://github.com/WebKit/WebKit/commit/7533deb1da033f11212d061fad58013f8dc401fb
  Author: Youenn Fablet <[email protected]>
  Date:   2024-02-18 (Sun, 18 Feb 2024)

  Changed paths:
    A LayoutTests/http/tests/inspector/gatherWebInspectorRTCLogs-expected.txt
    A LayoutTests/http/tests/inspector/gatherWebInspectorRTCLogs.html
    M LayoutTests/platform/glib/TestExpectations
    M LayoutTests/platform/mac-wk1/TestExpectations
    M Source/ThirdParty/libwebrtc/Configurations/libwebrtc.exp
    M Source/WebCore/CMakeLists.txt
    M Source/WebCore/DerivedSources-input.xcfilelist
    M Source/WebCore/DerivedSources-output.xcfilelist
    M Source/WebCore/DerivedSources.make
    M Source/WebCore/Modules/mediastream/PeerConnectionBackend.h
    M Source/WebCore/Modules/mediastream/RTCController.cpp
    M Source/WebCore/Modules/mediastream/RTCController.h
    M Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp
    M Source/WebCore/Modules/mediastream/RTCPeerConnection.h
    M Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp
    M Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h
    M 
Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp
    M 
Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.h
    M Source/WebCore/Sources.txt
    M Source/WebCore/WebCore.xcodeproj/project.pbxproj
    M Source/WebCore/dom/Document.cpp
    M Source/WebCore/dom/Document.h
    M Source/WebCore/inspector/CommandLineAPIHost.cpp
    M Source/WebCore/inspector/CommandLineAPIHost.h
    M Source/WebCore/inspector/CommandLineAPIHost.idl
    M Source/WebCore/inspector/CommandLineAPIModuleSource.js
    A Source/WebCore/inspector/RTCLogsCallback.h
    A Source/WebCore/inspector/RTCLogsCallback.idl
    M Source/WebCore/platform/SourcesLibWebRTC.txt
    A Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCLogSink.cpp
    A Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCLogSink.h
    M 
Source/WebInspectorUI/UserInterface/Controllers/JavaScriptRuntimeCompletionProvider.js

  Log Message:
  -----------
  Grab stats and libwebrtc logs from WebInspector directly
rdar://122803271
https://bugs.webkit.org/show_bug.cgi?id=269196

Reviewed by Eric Carlson and Devin Rousso.

To help web developpers, it is convenient to get access to WebRTC stats and 
logs.
We add a Web Inspector new function that allows to pass a JS callback to get 
those logs.
This can be extended in the future to rtc event logs as well.
This new function is called gatherRTCLogs and is only available in Web 
Inspector command line.

* LayoutTests/http/tests/inspector/gatherWebInspectorRTCLogs-expected.txt: 
Added.
* LayoutTests/http/tests/inspector/gatherWebInspectorRTCLogs.html: Added.
* LayoutTests/platform/glib/TestExpectations:
* LayoutTests/platform/mac-wk1/TestExpectations:
* Source/ThirdParty/libwebrtc/Configurations/libwebrtc.exp:
* Source/WebCore/CMakeLists.txt:
* Source/WebCore/DerivedSources-input.xcfilelist:
* Source/WebCore/DerivedSources-output.xcfilelist:
* Source/WebCore/DerivedSources.make:
* Source/WebCore/Modules/mediastream/PeerConnectionBackend.h:
(WebCore::PeerConnectionBackend::startGatheringStatLogs):
(WebCore::PeerConnectionBackend::stopGatheringStatLogs):
* Source/WebCore/Modules/mediastream/RTCController.cpp:
(WebCore::RTCController::RTCController):
(WebCore::RTCController::~RTCController):
(WebCore::RTCController::add):
(WebCore::RTCController::startGatheringLogs):
(WebCore::RTCController::stopGatheringLogs):
(WebCore::RTCController::startGatheringStatLogs):
(WebCore::RTCController::stopLoggingLibWebRTCLogs):
* Source/WebCore/Modules/mediastream/RTCController.h:
* Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp:
(WebCore::RTCPeerConnection::startGatheringStatLogs):
(WebCore::RTCPeerConnection::stopGatheringStatLogs):
* Source/WebCore/Modules/mediastream/RTCPeerConnection.h:
* Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
(WebCore::RTCStatsLogger::toJSONString const):
(WebCore::LibWebRTCMediaEndpoint::OnStatsDelivered):
(WebCore::LibWebRTCMediaEndpoint::statsLogInterval const):
(WebCore::LibWebRTCMediaEndpoint::startRTCLogs):
(WebCore::LibWebRTCMediaEndpoint::stopRTCLogs):
* Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h:
* 
Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp:
(WebCore::LibWebRTCPeerConnectionBackend::startGatheringStatLogs):
(WebCore::LibWebRTCPeerConnectionBackend::stopGatheringStatLogs):
(WebCore::LibWebRTCPeerConnectionBackend::provideStatLogs):
* Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.h:
* Source/WebCore/Sources.txt:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/dom/Document.cpp:
(WebCore::Document::startGatheringRTCLogs):
(WebCore::Document::stopGatheringRTCLogs):
* Source/WebCore/dom/Document.h:
* Source/WebCore/inspector/CommandLineAPIHost.cpp:
(WebCore::CommandLineAPIHost::gatherRTCLogs):
* Source/WebCore/inspector/CommandLineAPIHost.h:
* Source/WebCore/inspector/CommandLineAPIHost.idl:
* Source/WebCore/inspector/CommandLineAPIModuleSource.js:
(injectModule):
* Source/WebCore/inspector/RTCLogsCallback.h: Added.
* Source/WebCore/inspector/RTCLogsCallback.idl: Added.
* Source/WebCore/platform/SourcesLibWebRTC.txt:
* Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCLogSink.cpp: Added.
(WebCore::LibWebRTCLogSink::LibWebRTCLogSink):
(WebCore::LibWebRTCLogSink::~LibWebRTCLogSink):
(WebCore::toWebRTCLogLevel):
(WebCore::LibWebRTCLogSink::logMessage):
(WebCore::LibWebRTCLogSink::start):
(WebCore::LibWebRTCLogSink::stop):
* Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCLogSink.h: Added.
* 
Source/WebInspectorUI/UserInterface/Controllers/JavaScriptRuntimeCompletionProvider.js:
(WI.JavaScriptRuntimeCompletionProvider.get _commandLineAPIKeys):

Canonical link: https://commits.webkit.org/274946@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to