This commit enables touch and gestures handling.
Change-Id: I1a1602502f22452d583357d772fd3a829ac9074f
Signed-off-by: Chandan Padhi <c.padhi@samsung.com>
}
void RenderWidgetHostViewEfl::HandleGesture(ui::GestureEvent* event) {
- blink::WebGestureEvent gesture = MakeWebGestureEventFromUIEvent(*event);
-#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
- gesture.x = event->x();
- gesture.y = event->y();
-
- const gfx::Point root_point = event->root_location();
- gesture.global_x = root_point.x();
- gesture.global_y = root_point.y();
-#endif
if (event->type() == ui::ET_GESTURE_BEGIN)
HandleGestureBegin();
else if (event->type() == ui::ET_GESTURE_END)
HandleGestureEnd();
- SendGestureEvent(gesture);
+ blink::WebGestureEvent gesture_event = MakeWebGestureEventFromUIEvent(*event);
+ gesture_event.SetPositionInWidget(event->location_f());
+ gesture_event.SetPositionInScreen(event->root_location_f());
+ SendGestureEvent(gesture_event);
+
event->SetHandled();
}
ui::EventResult result = (ack_result == INPUT_EVENT_ACK_STATE_CONSUMED)
? ui::ER_HANDLED
: ui::ER_UNHANDLED;
-#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
- std::unique_ptr<ui::GestureRecognizer::Gestures> gestures;
- gestures.reset(gesture_recognizer_->AckTouchEvent(
- touch.event.unique_touch_event_id, result, this));
-
- if (gestures) {
- for (size_t j = 0; j < gestures->size(); ++j) {
- ui::GestureEvent* event = gestures.at(j);
- HandleGesture(event);
- }
- }
-#endif // !defined(EWK_BRINGUP)
+ ui::GestureRecognizer::Gestures gestures = gesture_recognizer_->AckTouchEvent(
+ touch.event.unique_touch_event_id, result,
+ false /* is_source_touch_event_set_non_blocking */, this);
+ for (const auto& event : gestures)
+ HandleGesture(event.get());
}
EdgeEffect& RenderWidgetHostViewEfl::EnsureEdgeEffect() {
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/web_contents_view_delegate.h"
#include "content/public/browser/web_contents_view_efl_delegate.h"
+#include "content/public/common/content_switches.h"
#include "efl/window_factory.h"
#include "tizen/system_info.h"
#include "ui/display/screen_efl.h"
-#include "ui/events/event_switches.h"
#include "ui/gfx/image/image_skia.h"
#include "ui/gl/gl_shared_context_efl.h"
touch_enabled_(IsMobileProfile() || IsWearableProfile()),
page_scale_factor_(1.0f),
web_contents_(contents) {
-#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
base::CommandLine* cmdline = base::CommandLine::ForCurrentProcess();
- if (cmdline->HasSwitch(switches::kTouchEvents)) {
- touch_enabled_ = cmdline->GetSwitchValueASCII(switches::kTouchEvents) ==
- switches::kTouchEventsEnabled;
+ if (cmdline->HasSwitch(switches::kTouchEventFeatureDetection)) {
+ touch_enabled_ =
+ cmdline->GetSwitchValueASCII(switches::kTouchEventFeatureDetection) ==
+ switches::kTouchEventFeatureDetectionEnabled;
}
-#endif
}
WebContentsViewEfl::~WebContentsViewEfl() {}
#include "tizen/system_info.h"
#include "ui/base/ui_base_switches.h"
#include "ui/events/event_switches.h"
-#include "ui/events/event_switches.h"
#include "url/gurl.h"
int CommandLineEfl::argc_ = 0;
if (IsMobileProfile() || IsWearableProfile()) {
p_command_line->AppendSwitch(switches::kUseMobileUserAgent);
+ p_command_line->AppendSwitchASCII(
+ switches::kTouchEventFeatureDetection,
+ switches::kTouchEventFeatureDetectionEnabled);
#if !defined(EWK_BRINGUP)
- p_command_line->AppendSwitchASCII(switches::kTouchEvents,
- switches::kTouchEventsEnabled);
p_command_line->AppendSwitch(switches::kEnablePinch);
// [M42_2231] FIXME: Need Parallel Canvas patch for S-Chromium/S-Blink/S-Skia
p_command_line->AppendSwitchASCII(
#include "content/public/browser/navigation_entry.h"
#include "content/public/browser/resource_dispatcher_host.h"
#include "content/public/common/content_client.h"
+#include "content/public/common/content_switches.h"
#include "content/public/common/user_agent.h"
#include "permission_popup_manager.cc"
#include "private/ewk_back_forward_list_private.h"
#include "tizen/system_info.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/display/screen.h"
-#include "ui/events/event_switches.h"
#include "web_contents_delegate_efl.h"
#include "web_contents_efl_delegate_ewk.h"
#include "web_contents_view_efl_delegate_ewk.h"
settings_.reset(new Ewk_Settings(
evas_object_,
web_contents_->GetRenderViewHost()->GetWebkitPreferences()));
-#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
base::CommandLine* cmdline = base::CommandLine::ForCurrentProcess();
- if (cmdline->HasSwitch(switches::kTouchEvents))
- SetTouchEventsEnabled(true);
- else
-#endif
+ if (cmdline->HasSwitch(switches::kTouchEventFeatureDetection)) {
+ SetTouchEventsEnabled(
+ cmdline->GetSwitchValueASCII(switches::kTouchEventFeatureDetection) ==
+ switches::kTouchEventFeatureDetectionEnabled);
+ } else {
SetMouseEventsEnabled(true);
+ }
popupMenuItems_ = 0;
popupPicker_ = 0;