Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(158)

Side by Side Diff: third_party/WebKit/Source/web/WebViewImpl.h

Issue 1463823003: Return a enumeration of the state of handling of InputEvents. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 23 matching lines...) Expand all
34 #include "core/page/ContextMenuProvider.h" 34 #include "core/page/ContextMenuProvider.h"
35 #include "core/page/EventWithHitTestResults.h" 35 #include "core/page/EventWithHitTestResults.h"
36 #include "platform/geometry/IntPoint.h" 36 #include "platform/geometry/IntPoint.h"
37 #include "platform/geometry/IntRect.h" 37 #include "platform/geometry/IntRect.h"
38 #include "platform/graphics/GraphicsLayer.h" 38 #include "platform/graphics/GraphicsLayer.h"
39 #include "platform/heap/Handle.h" 39 #include "platform/heap/Handle.h"
40 #include "public/platform/WebCompositorAnimationTimeline.h" 40 #include "public/platform/WebCompositorAnimationTimeline.h"
41 #include "public/platform/WebDisplayMode.h" 41 #include "public/platform/WebDisplayMode.h"
42 #include "public/platform/WebFloatSize.h" 42 #include "public/platform/WebFloatSize.h"
43 #include "public/platform/WebGestureCurveTarget.h" 43 #include "public/platform/WebGestureCurveTarget.h"
44 #include "public/platform/WebInputEventResult.h"
44 #include "public/platform/WebLayer.h" 45 #include "public/platform/WebLayer.h"
45 #include "public/platform/WebPoint.h" 46 #include "public/platform/WebPoint.h"
46 #include "public/platform/WebRect.h" 47 #include "public/platform/WebRect.h"
47 #include "public/platform/WebSize.h" 48 #include "public/platform/WebSize.h"
48 #include "public/platform/WebString.h" 49 #include "public/platform/WebString.h"
49 #include "public/platform/WebVector.h" 50 #include "public/platform/WebVector.h"
50 #include "public/web/WebInputEvent.h" 51 #include "public/web/WebInputEvent.h"
51 #include "public/web/WebNavigationPolicy.h" 52 #include "public/web/WebNavigationPolicy.h"
52 #include "public/web/WebPageImportanceSignals.h" 53 #include "public/web/WebPageImportanceSignals.h"
53 #include "public/web/WebView.h" 54 #include "public/web/WebView.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 void beginFrame(double lastFrameTimeMonotonic) override; 111 void beginFrame(double lastFrameTimeMonotonic) override;
111 112
112 void updateAllLifecyclePhases() override; 113 void updateAllLifecyclePhases() override;
113 void paint(WebCanvas*, const WebRect&) override; 114 void paint(WebCanvas*, const WebRect&) override;
114 #if OS(ANDROID) 115 #if OS(ANDROID)
115 void paintCompositedDeprecated(WebCanvas*, const WebRect&) override; 116 void paintCompositedDeprecated(WebCanvas*, const WebRect&) override;
116 #endif 117 #endif
117 void layoutAndPaintAsync(WebLayoutAndPaintAsyncCallback*) override; 118 void layoutAndPaintAsync(WebLayoutAndPaintAsyncCallback*) override;
118 void compositeAndReadbackAsync(WebCompositeAndReadbackAsyncCallback*) overri de; 119 void compositeAndReadbackAsync(WebCompositeAndReadbackAsyncCallback*) overri de;
119 void themeChanged() override; 120 void themeChanged() override;
120 bool handleInputEvent(const WebInputEvent&) override; 121 WebInputEventResult handleInputEvent(const WebInputEvent&) override;
121 void setCursorVisibilityState(bool isVisible) override; 122 void setCursorVisibilityState(bool isVisible) override;
122 bool hasTouchEventHandlersAt(const WebPoint&) override; 123 bool hasTouchEventHandlersAt(const WebPoint&) override;
123 124
124 void applyViewportDeltas( 125 void applyViewportDeltas(
125 const WebFloatSize& visualViewportDelta, 126 const WebFloatSize& visualViewportDelta,
126 const WebFloatSize& layoutViewportDelta, 127 const WebFloatSize& layoutViewportDelta,
127 const WebFloatSize& elasticOverscrollDelta, 128 const WebFloatSize& elasticOverscrollDelta,
128 float pageScaleDelta, 129 float pageScaleDelta,
129 float topControlsShownRatioDelta) override; 130 float topControlsShownRatioDelta) override;
130 void recordFrameTimingEvent(enum FrameTimingEventType, int64_t, const WebVec tor<WebFrameTimingEvent>&) override; 131 void recordFrameTimingEvent(enum FrameTimingEventType, int64_t, const WebVec tor<WebFrameTimingEvent>&) override;
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 354
354 // WebGestureCurveTarget implementation for fling. 355 // WebGestureCurveTarget implementation for fling.
355 bool scrollBy(const WebFloatSize& delta, const WebFloatSize& velocity) overr ide; 356 bool scrollBy(const WebFloatSize& delta, const WebFloatSize& velocity) overr ide;
356 357
357 // Handles context menu events orignated via the the keyboard. These 358 // Handles context menu events orignated via the the keyboard. These
358 // include the VK_APPS virtual key and the Shift+F10 combine. Code is 359 // include the VK_APPS virtual key and the Shift+F10 combine. Code is
359 // based on the Webkit function bool WebView::handleContextMenuEvent(WPARAM 360 // based on the Webkit function bool WebView::handleContextMenuEvent(WPARAM
360 // wParam, LPARAM lParam) in webkit\webkit\win\WebView.cpp. The only 361 // wParam, LPARAM lParam) in webkit\webkit\win\WebView.cpp. The only
361 // significant change in this function is the code to convert from a 362 // significant change in this function is the code to convert from a
362 // Keyboard event to the Right Mouse button down event. 363 // Keyboard event to the Right Mouse button down event.
363 bool sendContextMenuEvent(const WebKeyboardEvent&); 364 WebInputEventResult sendContextMenuEvent(const WebKeyboardEvent&);
364 365
365 void showContextMenuAtPoint(float x, float y, PassRefPtrWillBeRawPtr<Context MenuProvider>); 366 void showContextMenuAtPoint(float x, float y, PassRefPtrWillBeRawPtr<Context MenuProvider>);
366 367
367 void showContextMenuForElement(WebElement); 368 void showContextMenuForElement(WebElement);
368 369
369 // Notifies the WebView that a load has been committed. isNewNavigation 370 // Notifies the WebView that a load has been committed. isNewNavigation
370 // will be true if a new session history item should be created for that 371 // will be true if a new session history item should be created for that
371 // load. isNavigationWithinPage will be true if the navigation does 372 // load. isNavigationWithinPage will be true if the navigation does
372 // not take the user away from the current page. 373 // not take the user away from the current page.
373 void didCommitLoad(bool isNewNavigation, bool isNavigationWithinPage); 374 void didCommitLoad(bool isNewNavigation, bool isNavigationWithinPage);
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
588 // Helper function: Widens the width of |source| by the specified margins 589 // Helper function: Widens the width of |source| by the specified margins
589 // while keeping it smaller than page width. 590 // while keeping it smaller than page width.
590 WebRect widenRectWithinPageBounds(const WebRect& source, int targetMargin, i nt minimumMargin); 591 WebRect widenRectWithinPageBounds(const WebRect& source, int targetMargin, i nt minimumMargin);
591 592
592 void pointerLockMouseEvent(const WebInputEvent&); 593 void pointerLockMouseEvent(const WebInputEvent&);
593 594
594 // PageWidgetEventHandler functions 595 // PageWidgetEventHandler functions
595 void handleMouseLeave(LocalFrame&, const WebMouseEvent&) override; 596 void handleMouseLeave(LocalFrame&, const WebMouseEvent&) override;
596 void handleMouseDown(LocalFrame&, const WebMouseEvent&) override; 597 void handleMouseDown(LocalFrame&, const WebMouseEvent&) override;
597 void handleMouseUp(LocalFrame&, const WebMouseEvent&) override; 598 void handleMouseUp(LocalFrame&, const WebMouseEvent&) override;
598 bool handleMouseWheel(LocalFrame&, const WebMouseWheelEvent&) override; 599 WebInputEventResult handleMouseWheel(LocalFrame&, const WebMouseWheelEvent&) override;
599 bool handleGestureEvent(const WebGestureEvent&) override; 600 WebInputEventResult handleGestureEvent(const WebGestureEvent&) override;
600 bool handleKeyEvent(const WebKeyboardEvent&) override; 601 WebInputEventResult handleKeyEvent(const WebKeyboardEvent&) override;
601 bool handleCharEvent(const WebKeyboardEvent&) override; 602 WebInputEventResult handleCharEvent(const WebKeyboardEvent&) override;
602 603
603 bool handleSyntheticWheelFromTouchpadPinchEvent(const WebGestureEvent&); 604 WebInputEventResult handleSyntheticWheelFromTouchpadPinchEvent(const WebGest ureEvent&);
604 605
605 WebPlugin* focusedPluginIfInputMethodSupported(LocalFrame*); 606 WebPlugin* focusedPluginIfInputMethodSupported(LocalFrame*);
606 607
607 void enablePopupMouseWheelEventListener(); 608 void enablePopupMouseWheelEventListener();
608 void disablePopupMouseWheelEventListener(); 609 void disablePopupMouseWheelEventListener();
609 610
610 void cancelPagePopup(); 611 void cancelPagePopup();
611 void updatePageOverlays(); 612 void updatePageOverlays();
612 613
613 WebViewClient* m_client; // Can be 0 (e.g. unittests, shared workers, etc.) 614 WebViewClient* m_client; // Can be 0 (e.g. unittests, shared workers, etc.)
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
754 }; 755 };
755 756
756 DEFINE_TYPE_CASTS(WebViewImpl, WebWidget, widget, widget->isWebView(), widget.is WebView()); 757 DEFINE_TYPE_CASTS(WebViewImpl, WebWidget, widget, widget->isWebView(), widget.is WebView());
757 // We have no ways to check if the specified WebView is an instance of 758 // We have no ways to check if the specified WebView is an instance of
758 // WebViewImpl because WebViewImpl is the only implementation of WebView. 759 // WebViewImpl because WebViewImpl is the only implementation of WebView.
759 DEFINE_TYPE_CASTS(WebViewImpl, WebView, webView, true, true); 760 DEFINE_TYPE_CASTS(WebViewImpl, WebView, webView, true, true);
760 761
761 } // namespace blink 762 } // namespace blink
762 763
763 #endif 764 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698