-
barraclough@apple.com authored
https://bugs.webkit.org/show_bug.cgi?id=126330 Reviewed by Sam Weinig. UserActivity is a mechanism to express to the operating system (where appropriate) that a user initiated activity is taking place, and as such that resources should be made available to the process accordingly. Currently we hold a single NSActivity, at the WebKit layer. This refactoring allows us to hold different activity tokens for different user actions (which simplifies the handling, and aides debugging since the token can more accurately express the activity taking place), and also will allow us to avoid the layering difficulty of calling back up the stack to WebKit to register that an activity is taking place. * WebCore.xcodeproj/project.pbxproj: - added new files. * platform/UserActivity.cpp: Added. (WebCore::UserActivity::UserActivity): - nop implementation - ignore description. (WebCore::UserActivity::beginActivity): (WebCore::UserActivity::endActivity): - nop implementation - just inc/dec m_count. * platform/UserActivity.h: Added. (WebCore::UserActivity::isActive): - returns true if one or more instance of this activity is in progress. * platform/mac/UserActivityMac.mm: Added. (WebCore::UserActivity::UserActivity): - constructor accepts one argument, a description string. (WebCore::UserActivity::isValid): - used by assertions. (WebCore::UserActivity::beginActivity): (WebCore::UserActivity::endActivity): - track start/end of an activity - calls to these methods should be balanced. (WebCore::UserActivity::hysteresisTimerFired): - used to implement hysteresis in releasing NSActivity. Source/WebKit2: VibrationPattern should allocate an single vector instance for single integer input https://bugs.webkit.org/show_bug.cgi?id=126417 Patch by Jinwoo Song <jinwoo7.song@samsung.com> on 2014-01-03 Reviewed by Gyuyoung Kim. Fix a vibration unit test regression after r161139. Also remove unnecessary test cases. * UIProcess/API/efl/tests/test_ewk2_view.cpp: (EWK2ViewTest::loadVibrationHTMLString): (TEST_F): Source/WTF: Refactor NSActivity handling code from ChildProcess to UserActivity https://bugs.webkit.org/show_bug.cgi?id=126330 Reviewed by Sam Weinig. UserActivity is a mechanism to express to the operating system (where appropriate) that a user initiated activity is taking place, and as such that resources should be made available to the process accordingly. Currently we hold a single NSActivity, at the WebKit layer. This refactoring allows us to hold different activity tokens for different user actions (which simplifies the handling, and aides debugging since the token can more accurately express the activity taking place), and also will allow us to avoid the layering difficulty of calling back up the stack to WebKit to register that an activity is taking place. * wtf/Platform.h: - added HAVE_NS_ACTIVITY. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161271 268f45cc-cd09-0410-ab3c-d52691b4dbfc
13e4c0c7