Add a ChromeClient method to send diagnostic logging messages from WebCore to the...
authorjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 26 Jul 2012 18:45:46 +0000 (18:45 +0000)
committerjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 26 Jul 2012 18:45:46 +0000 (18:45 +0000)
commita70aaff40c6b589c2a19ceb0ae106a3fd260bfa5
treeb2c3ab6124738b475906437de4c6c8969e51953d
parent8585e730834b1aa6926ad7e57fe5c449f0eef8c3
Add a ChromeClient method to send diagnostic logging messages from WebCore to the client.
https://bugs.webkit.org/show_bug.cgi?id=92340

Reviewed by Anders Carlsson.

Source/WebCore:

Add a new ChromeClient menthod, to be implemented by WebKit and WebKit2, which sends
a diagnostic logging message up to the client.

* page/ChromeClient.h:
(WebCore::ChromeClient::logDiagnosticMessage):
* page/ChromeClient.h:
(WebCore::ChromeClient::logDiagnosticMessage):
(ChromeClient):
* page/DiagnosticLoggingKeys.cpp: Added.
(WebCore::DiagnosticLoggingKeys::mediaLoadedKey):
(WebCore::DiagnosticLoggingKeys::mediaLoadingFailedKey):
(WebCore::DiagnosticLoggingKeys::pluginLoadedKey):
(WebCore::DiagnosticLoggingKeys::pluginLoadingFailedKey):
(WebCore::DiagnosticLoggingKeys::passKey):
(WebCore::DiagnosticLoggingKeys::failKey):
(WebCore::DiagnosticLoggingKeys::noopKey):
* page/DiagnosticLoggingKeys.h: Added.
(DiagnosticLoggingKeys):

Add the new files DiagnosticLoggingKeys.cpp,h to the project:
* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:

Source/WebKit2:

Pipe the ChromeClient logDiagnosticMessage() function through WebKit2 to a new bundle class
InjectedBundlePageDiagnosticLoggingClient, to be implemented by the client.

* WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
(WKBundlePageSetDiagnosticLoggingClient): Added.
* WebProcess/InjectedBundle/API/c/WKBundlePage.h:
* WebProcess/InjectedBundle/InjectedBundlePageDiagnosticLoggingClient.cpp: Added.
(WebKit::InjectedBundlePageDiagnosticLoggingClient::logDiagnosticMessage):
* WebProcess/InjectedBundle/InjectedBundlePageDiagnosticLoggingClient.h: Added.
(InjectedBundlePageDiagnosticLoggingClient):
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::logDiagnosticMessage):
* WebProcess/WebCoreSupport/WebChromeClient.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::initializeInjectedBundleDiagnosticLoggingClient):
* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::injectedBundleDiagnosticLoggingClient):

Add a convenience class to retrieve the diagnostic message keys:
* WebProcess/InjectedBundle/InjectedBundlePageDiagnosticLoggingClient.cpp: Added.
(WebKit::InjectedBundlePageDiagnosticLoggingClient::logDiagnosticMessage):
* WebProcess/InjectedBundle/InjectedBundlePageDiagnosticLoggingClient.h: Added.
(InjectedBundlePageDiagnosticLoggingClient):

Add the InjectedBundlePageDiagnosticLoggingClient.cpp,h files.
* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* win/WebKit2.vcproj:
* WebKit2.xcodeproj/project.pbxproj:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@123778 268f45cc-cd09-0410-ab3c-d52691b4dbfc
24 files changed:
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/GNUmakefile.list.am
Source/WebCore/Target.pri
Source/WebCore/WebCore.gypi
Source/WebCore/WebCore.vcproj/WebCore.vcproj
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/page/ChromeClient.h
Source/WebCore/page/DiagnosticLoggingKeys.cpp [new file with mode: 0644]
Source/WebCore/page/DiagnosticLoggingKeys.h [new file with mode: 0644]
Source/WebKit2/CMakeLists.txt
Source/WebKit2/ChangeLog
Source/WebKit2/GNUmakefile.list.am
Source/WebKit2/Target.pri
Source/WebKit2/WebKit2.xcodeproj/project.pbxproj
Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.cpp
Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.h
Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageDiagnosticLoggingClient.cpp [new file with mode: 0644]
Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageDiagnosticLoggingClient.h [new file with mode: 0644]
Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp
Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.h
Source/WebKit2/WebProcess/WebPage/WebPage.cpp
Source/WebKit2/WebProcess/WebPage/WebPage.h
Source/WebKit2/win/WebKit2.vcproj