Add diagnostic logging to track per-page media engine usage.
authorjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 18 Oct 2012 18:12:57 +0000 (18:12 +0000)
committerjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 18 Oct 2012 18:12:57 +0000 (18:12 +0000)
commitb0ae9c672b719654b2629da651c5551ceca4986c
tree0df5de160b2ec0c7360819b9a7e8de3e2407e9af
parent475042ca4a5d6417e92c814f55a77304a6876aa9
Add diagnostic logging to track per-page media engine usage.
https://bugs.webkit.org/show_bug.cgi?id=99615
<rdar://problem/12476473>

Reviewed by Eric Carlson.

Add diagnostic logging triggered only once-per-page and once-per-page-per-engine.

* html/HTMLMediaElement.cpp:
(WebCore::logMediaLoadRequest): Encapsulate diagnostic logging into single static method.
(WebCore::HTMLMediaElement::mediaLoadingFailed): Call logMediaLoadRequest.
(WebCore::HTMLMediaElement::setReadyState): Ditto.
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::dispatchDidCommitLoad): Reset the set of seen media engines.

Add new methods to Page to track per-page media engine diagnostic info, similar to plugin diagnostic info.
* page/Page.cpp:
(WebCore::Page::hasSeenAnyMediaEngine):
(WebCore::Page::hasSeenMediaEngine):
(WebCore::Page::sawMediaEngine):
(WebCore::Page::resetSeenMediaEngines):
* page/Page.h:

Add new static logging key definitions:
* page/DiagnosticLoggingKeys.cpp:
(WebCore::DiagnosticLoggingKeys::pageContainsMediaEngineKey):
(WebCore::DiagnosticLoggingKeys::pageContainsAtLeastOneMediaEngineKey):
* page/DiagnosticLoggingKeys.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@131779 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/html/HTMLMediaElement.cpp
Source/WebCore/loader/FrameLoader.cpp
Source/WebCore/page/DiagnosticLoggingKeys.cpp
Source/WebCore/page/DiagnosticLoggingKeys.h
Source/WebCore/page/Page.cpp
Source/WebCore/page/Page.h