#include "content/common/cursors/webcursor_efl.h"
#include "content/public/browser/render_widget_host_view_frame_subscriber.h"
#include "content/public/browser/screen_orientation_dispatcher_host.h"
+#include "content/public/browser/web_contents_delegate.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/context_factory.h"
#include "content/public/browser/render_process_host.h"
restore_showing_large_handle_on_gesture_end_,
should_restore_selection_menu_);
-#if defined(EWK_REFACTOR)
if ((event.type == blink::WebInputEvent::GesturePinchBegin ||
event.type == blink::WebInputEvent::GesturePinchUpdate ||
event.type == blink::WebInputEvent::GesturePinchEnd) &&
- (!pinch_zoom_enabled_ || eweb_view()->IsFullscreen())) {
+ (!pinch_zoom_enabled_ || (web_contents_.GetDelegate() &&
+ web_contents_.GetDelegate()->IsFullscreenForTabOrPending(&web_contents_)))) {
return;
}
if (event.type == blink::WebInputEvent::GestureDoubleTap ||
- event.type == blink::WebInputEvent::GesturePinchBegin) {
- eweb_view()->SmartCallback<EWebViewCallbacks::ZoomStarted>().call();
- }
- if (event.type == blink::WebInputEvent::GestureDoubleTap ||
+ event.type == blink::WebInputEvent::GesturePinchBegin ||
event.type == blink::WebInputEvent::GesturePinchEnd) {
- eweb_view()->SmartCallback<EWebViewCallbacks::ZoomFinished>().call();
+ WebContentsImpl* wci = static_cast<WebContentsImpl*>(&web_contents_);
+ WebContentsViewEfl* wcve = static_cast<WebContentsViewEfl*>(wci->GetView());
+ wcve->HandleZoomGesture(event);
}
-#endif
if (event.type == blink::WebInputEvent::GestureTap ||
event.type == blink::WebInputEvent::GestureTapCancel) {
#include "content/common/content_export.h"
#include "content/public/common/menu_item.h"
+#include "third_party/WebKit/public/web/WebInputEvent.h"
#include "ui/gfx/geometry/rect.h"
namespace content {
virtual void CancelContextMenu(int request_id) = 0;
virtual void QuerySelectionStyle() = 0;
+ virtual void HandleZoomGesture(blink::WebGestureEvent& event) = 0;
};
} // namespace content
return GetSelectionController()->TextSelectionUp(x, y);
}
+void EWebView::HandleZoomGesture(blink::WebGestureEvent& event) {
+ if (event.type == blink::WebInputEvent::GestureDoubleTap ||
+ event.type == blink::WebInputEvent::GesturePinchBegin) {
+ SmartCallback<EWebViewCallbacks::ZoomStarted>().call();
+ }
+ if (event.type == blink::WebInputEvent::GestureDoubleTap ||
+ event.type == blink::WebInputEvent::GesturePinchEnd) {
+ SmartCallback<EWebViewCallbacks::ZoomFinished>().call();
+ }
+}
+
void EWebView::SendDelayedMessages(RenderViewHost* render_view_host) {
DCHECK(render_view_host);