Support the Network Information API
authorgyuyoung.kim@samsung.com <gyuyoung.kim@samsung.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 1 Apr 2012 15:09:25 +0000 (15:09 +0000)
committergyuyoung.kim@samsung.com <gyuyoung.kim@samsung.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 1 Apr 2012 15:09:25 +0000 (15:09 +0000)
commit56c097d08572d8a71044fd5c97ec4d41ea9ac9af
tree192ba78e7558c152cc255b501806ff27f9e81ed7
parent4d2c06446c318d7a8b4555e954ba882c1a321530
Support the Network Information API
https://bugs.webkit.org/show_bug.cgi?id=73528

Reviewed by Adam Barth.

.:

Add network information API feature.

* Source/cmake/OptionsEfl.cmake: Add NETWORK_INFO feature.
* Source/cmakeconfig.h.cmake: Add NETWORK_INFO feature.

Source/WebCore:

Network Information APIs is to provide an interface for Web Applications to access
the underlying network information of device. In Web Application case, they need to know
what current network interface it uses. Because, it is important to know current network
information(bandwidth, metered) in mobile domain. Thus, Web Application can let user know
whether current network information via this new functionality. In addition, in streaming
service case, Web Application can control content resolution according to kind of network.

http://dvcs.w3.org/hg/dap/raw-file/tip/network-api/index.html

Tests: networkinformation/add-listener-from-callback.html
       networkinformation/basic-all-types-of-events.html
       networkinformation/basic-operation.html
       networkinformation/event-after-navigation.html
       networkinformation/multiple-frames.html
       networkinformation/updates.html
       networkinformation/window-property.html

* CMakeLists.txt:
* Modules/networkinfo/NavigatorNetworkInfoConnection.cpp: Added.
(WebCore):
(WebCore::NavigatorNetworkInfoConnection::NavigatorNetworkInfoConnection):
(WebCore::NavigatorNetworkInfoConnection::~NavigatorNetworkInfoConnection):
(WebCore::NavigatorNetworkInfoConnection::from):
(WebCore::NavigatorNetworkInfoConnection::webkitConnection):
* Modules/networkinfo/NavigatorNetworkInfoConnection.h: Added.
(WebCore):
(NavigatorNetworkInfoConnection):
* Modules/networkinfo/NavigatorNetworkInfoConnection.idl: Added.
* Modules/networkinfo/NetworkInfo.cpp: Added.
(WebCore):
(WebCore::NetworkInfo::NetworkInfo):
* Modules/networkinfo/NetworkInfo.h: Added.
(WebCore):
(NetworkInfo):
(WebCore::NetworkInfo::create):
(WebCore::NetworkInfo::bandwidth):
(WebCore::NetworkInfo::metered):
* Modules/networkinfo/NetworkInfoClient.h: Added.
(WebCore):
(NetworkInfoClient):
(WebCore::NetworkInfoClient::~NetworkInfoClient):
* Modules/networkinfo/NetworkInfoConnection.cpp: Added.
(WebCore):
(WebCore::NetworkInfoConnection::create):
(WebCore::NetworkInfoConnection::NetworkInfoConnection):
(WebCore::NetworkInfoConnection::~NetworkInfoConnection):
(WebCore::NetworkInfoConnection::bandwidth):
(WebCore::NetworkInfoConnection::metered):
(WebCore::NetworkInfoConnection::didChangeNetworkInformation):
(WebCore::NetworkInfoConnection::addEventListener):
(WebCore::NetworkInfoConnection::removeEventListener):
(WebCore::NetworkInfoConnection::eventTargetData):
(WebCore::NetworkInfoConnection::ensureEventTargetData):
(WebCore::NetworkInfoConnection::interfaceName):
(WebCore::NetworkInfoConnection::suspend):
(WebCore::NetworkInfoConnection::resume):
(WebCore::NetworkInfoConnection::stop):
* Modules/networkinfo/NetworkInfoConnection.h: Added.
(WebCore):
(NetworkInfoConnection):
(WebCore::NetworkInfoConnection::scriptExecutionContext):
(WebCore::NetworkInfoConnection::canSuspend):
(WebCore::NetworkInfoConnection::refEventTarget):
(WebCore::NetworkInfoConnection::derefEventTarget):
* Modules/networkinfo/NetworkInfoConnection.idl: Added.
* Modules/networkinfo/NetworkInfoController.cpp: Added.
(WebCore):
(WebCore::NetworkInfoController::NetworkInfoController):
(WebCore::NetworkInfoController::~NetworkInfoController):
(WebCore::NetworkInfoController::create):
(WebCore::NetworkInfoController::addListener):
(WebCore::NetworkInfoController::removeListener):
(WebCore::NetworkInfoController::didChangeNetworkInformation):
(WebCore::NetworkInfoController::isActive):
(WebCore::NetworkInfoController::supplementName):
(WebCore::provideNetworkInfoTo):
* Modules/networkinfo/NetworkInfoController.h: Added.
(WebCore):
(NetworkInfoController):
(WebCore::NetworkInfoController::client):
(WebCore::NetworkInfoController::from):
* dom/EventNames.h:
(WebCore):
* dom/EventTargetFactory.in:
* testing/Internals.cpp:
(WebCore::Internals::setNetworkInformation):
(WebCore):
* testing/Internals.h:
(Internals):
* testing/Internals.idl:

Source/WebKit:

* PlatformEfl.cmake: Add dummy NetworkInfoClientEfl.cpp files in order to support network information API.

Source/WebKit/efl:

Add NetworkInfoClientEfl to support network information API. However,
functions are not implemented yet.

* WebCoreSupport/NetworkInfoClientEfl.cpp: Added.
(WebCore::NetworkInfoClientEfl::NetworkInfoClientEfl):
(WebCore):
(WebCore::NetworkInfoClientEfl::~NetworkInfoClientEfl):
(WebCore::NetworkInfoClientEfl::startUpdating):
(WebCore::NetworkInfoClientEfl::stopUpdating):
(WebCore::NetworkInfoClientEfl::bandwidth):
(WebCore::NetworkInfoClientEfl::metered):
* WebCoreSupport/NetworkInfoClientEfl.h: Added.
(NetworkInfoClientEfl):
* ewk/ewk_view.cpp:
(_Ewk_View_Private_Data):
(_ewk_view_priv_new):

Tools:

Add network information API feature to build script.

* Scripts/build-webkit:

LayoutTests:

Add new test cases for network information API specification.
And also, skip this test cases for other ports.

* networkinformation/add-listener-from-callback-expected.txt: Added.
* networkinformation/add-listener-from-callback.html: Added.
* networkinformation/basic-all-types-of-events-expected.txt: Added.
* networkinformation/basic-all-types-of-events.html: Added.
* networkinformation/basic-operation-expected.txt: Added.
* networkinformation/basic-operation.html: Added.
* networkinformation/event-after-navigation-expected.txt: Added.
* networkinformation/event-after-navigation.html: Added.
* networkinformation/multiple-frames-expected.txt: Added.
* networkinformation/multiple-frames.html: Added.
* networkinformation/resources/event-after-navigation-new.html: Added.
* networkinformation/script-tests/add-listener-from-callback.js: Added.
(checkNetworkInformation):
(firstListener):
(secondListener):
(maybeFinishTest):
* networkinformation/script-tests/basic-all-types-of-events.js: Added.
(checkNetworkInformation):
* networkinformation/script-tests/basic-operation.js: Added.
* networkinformation/script-tests/event-after-navigation.js: Added.
* networkinformation/script-tests/multiple-frames.js: Added.
(checkNetworkInformation):
(checkChildNetworkInformation):
(mainFrameListener):
(childFrameListener):
(maybeFinishTest):
* networkinformation/script-tests/updates.js: Added.
(checkNetworkInformation):
(setNetworkInformation):
(firstListener):
(updateListener):
* networkinformation/script-tests/window-property.js: Added.
(hasOnConnectionProperty):
* networkinformation/updates-expected.txt: Added.
* networkinformation/updates.html: Added.
* networkinformation/window-property-expected.txt: Added.
* networkinformation/window-property.html: Added.
* platform/gtk/Skipped:
* platform/mac/Skipped:
* platform/qt/Skipped:
* platform/wincairo/Skipped:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@112815 268f45cc-cd09-0410-ab3c-d52691b4dbfc
57 files changed:
ChangeLog
LayoutTests/ChangeLog
LayoutTests/networkinformation/add-listener-from-callback-expected.txt [new file with mode: 0644]
LayoutTests/networkinformation/add-listener-from-callback.html [new file with mode: 0644]
LayoutTests/networkinformation/basic-all-types-of-events-expected.txt [new file with mode: 0644]
LayoutTests/networkinformation/basic-all-types-of-events.html [new file with mode: 0644]
LayoutTests/networkinformation/basic-operation-expected.txt [new file with mode: 0644]
LayoutTests/networkinformation/basic-operation.html [new file with mode: 0644]
LayoutTests/networkinformation/event-after-navigation-expected.txt [new file with mode: 0644]
LayoutTests/networkinformation/event-after-navigation.html [new file with mode: 0644]
LayoutTests/networkinformation/multiple-frames-expected.txt [new file with mode: 0644]
LayoutTests/networkinformation/multiple-frames.html [new file with mode: 0644]
LayoutTests/networkinformation/resources/event-after-navigation-new.html [new file with mode: 0644]
LayoutTests/networkinformation/script-tests/add-listener-from-callback.js [new file with mode: 0644]
LayoutTests/networkinformation/script-tests/basic-all-types-of-events.js [new file with mode: 0644]
LayoutTests/networkinformation/script-tests/basic-operation.js [new file with mode: 0644]
LayoutTests/networkinformation/script-tests/event-after-navigation.js [new file with mode: 0644]
LayoutTests/networkinformation/script-tests/multiple-frames.js [new file with mode: 0644]
LayoutTests/networkinformation/script-tests/updates.js [new file with mode: 0644]
LayoutTests/networkinformation/script-tests/window-property.js [new file with mode: 0644]
LayoutTests/networkinformation/updates-expected.txt [new file with mode: 0644]
LayoutTests/networkinformation/updates.html [new file with mode: 0644]
LayoutTests/networkinformation/window-property-expected.txt [new file with mode: 0644]
LayoutTests/networkinformation/window-property.html [new file with mode: 0644]
LayoutTests/platform/chromium/test_expectations.txt
LayoutTests/platform/gtk/Skipped
LayoutTests/platform/mac/Skipped
LayoutTests/platform/qt/Skipped
LayoutTests/platform/wincairo/Skipped
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/Modules/networkinfo/NavigatorNetworkInfoConnection.cpp [new file with mode: 0644]
Source/WebCore/Modules/networkinfo/NavigatorNetworkInfoConnection.h [new file with mode: 0644]
Source/WebCore/Modules/networkinfo/NavigatorNetworkInfoConnection.idl [new file with mode: 0644]
Source/WebCore/Modules/networkinfo/NetworkInfo.cpp [new file with mode: 0644]
Source/WebCore/Modules/networkinfo/NetworkInfo.h [new file with mode: 0644]
Source/WebCore/Modules/networkinfo/NetworkInfoClient.h [new file with mode: 0644]
Source/WebCore/Modules/networkinfo/NetworkInfoConnection.cpp [new file with mode: 0644]
Source/WebCore/Modules/networkinfo/NetworkInfoConnection.h [new file with mode: 0644]
Source/WebCore/Modules/networkinfo/NetworkInfoConnection.idl [new file with mode: 0644]
Source/WebCore/Modules/networkinfo/NetworkInfoController.cpp [new file with mode: 0644]
Source/WebCore/Modules/networkinfo/NetworkInfoController.h [new file with mode: 0644]
Source/WebCore/dom/EventNames.h
Source/WebCore/dom/EventTargetFactory.in
Source/WebCore/testing/Internals.cpp
Source/WebCore/testing/Internals.h
Source/WebCore/testing/Internals.idl
Source/WebKit/ChangeLog
Source/WebKit/PlatformEfl.cmake
Source/WebKit/efl/ChangeLog
Source/WebKit/efl/WebCoreSupport/NetworkInfoClientEfl.cpp [new file with mode: 0644]
Source/WebKit/efl/WebCoreSupport/NetworkInfoClientEfl.h [new file with mode: 0644]
Source/WebKit/efl/ewk/ewk_view.cpp
Source/cmake/OptionsEfl.cmake
Source/cmakeconfig.h.cmake
Tools/ChangeLog
Tools/Scripts/build-webkit