From: surya.kumar7 Date: Thu, 27 Sep 2018 13:30:44 +0000 (+0530) Subject: Add vibration capabilities in PWRT X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3f59248d19f124a3f253261f73a62460979505bc;p=platform%2Fframework%2Fweb%2Fcrosswalk-tizen.git Add vibration capabilities in PWRT PWRT as the client is responsible for listening to events from VibrationManager and call appropriate system APIs for vibration without which tct-vibration-w3c-tests fails Depends on https://review.tizen.org/gerrit/#/c/190168/ Change-Id: I2964136795a04adeb26e45c3b32797dd6a0aee08 Signed-off-by: surya.kumar7 --- diff --git a/efl/build/system.gyp b/efl/build/system.gyp index 4b56c0d9a..3b4076496 100644 --- a/efl/build/system.gyp +++ b/efl/build/system.gyp @@ -302,5 +302,26 @@ }], ], }, # tts + { + 'target_name': 'capi-system-device', + 'type': 'none', + 'conditions': [ + ['is_tizen==1', { + 'direct_dependent_settings': { + 'cflags': [ + ' +#include "device/vibration/vibration_provider_client.h" + +namespace tizen { + +class VibrationManager : public device::VibrationProviderClient { + public: + static void CreateInstance(); + VibrationManager(); + /** + * Starts the vibration for the given amount of time + * + * @param vibrationTime amount of time for which vibration should happen + */ + void Vibrate(uint64_t vibrationTime) override; + + /** + * Cancels the vibration + */ + void CancelVibration() override; + virtual ~VibrationManager(); + private: + bool Initialize(); + // haptic_devce_h was declared as int + haptic_device_h handle_; +}; + +} // namespace tizen + +#endif // TIZEN_BROWSER_VIBRATION_MANAGER_H_ diff --git a/wrt.gyp b/wrt.gyp index 9fef52638..89ca83312 100644 --- a/wrt.gyp +++ b/wrt.gyp @@ -18,6 +18,7 @@ '<(DEPTH)/efl/build/system.gyp:ecore', '<(DEPTH)/efl/build/system.gyp:launchpad', '<(DEPTH)/efl/build/system.gyp:capi-appfw-application', + '<(DEPTH)/efl/build/system.gyp:capi-system-device', '<(DEPTH)/efl/build/system.gyp:elementary', '<(DEPTH)/efl/build/system.gyp:tts', 'electron_shell_copy', @@ -55,6 +56,7 @@ 'dependencies': [ 'wrt_lib', '<(DEPTH)/efl/build/system.gyp:capi-appfw-application', + '<(DEPTH)/efl/build/system.gyp:capi-system-device', '<(DEPTH)/tizen/common/common.gyp:wrt_common', ], 'sources': [ @@ -142,6 +144,8 @@ 'tizen/src/browser/wrt_service.h', 'tizen/browser/tizen_browser_parts.cc', 'tizen/browser/tizen_browser_parts.h', + 'tizen/browser/vibration_manager.cc', + 'tizen/browser/vibration_manager.h', ], 'sources/': [ # chromium-efl supports only tizen webrtc using CAPI