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

Unified Diff: third_party/WebKit/Source/web/WebFrameWidgetBase.h

Issue 2696523003: Unify the code paths for handling mouse events when pointer is locked on (Closed)
Patch Set: remove null check Created 3 years, 10 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/web/WebFrameWidgetBase.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/web/WebFrameWidgetBase.h
diff --git a/third_party/WebKit/Source/web/WebFrameWidgetBase.h b/third_party/WebKit/Source/web/WebFrameWidgetBase.h
index 420470a0aaad448fc6bcde66f5eea8f82e948555..ecd5690966f19888548097ee2a36bb833596689b 100644
--- a/third_party/WebKit/Source/web/WebFrameWidgetBase.h
+++ b/third_party/WebKit/Source/web/WebFrameWidgetBase.h
@@ -6,7 +6,7 @@
#define WebFrameWidgetBase_h
#include "core/clipboard/DataObject.h"
-
+#include "platform/UserGestureIndicator.h"
#include "public/platform/WebDragData.h"
#include "public/web/WebFrameWidget.h"
#include "wtf/Assertions.h"
@@ -76,6 +76,11 @@ class WebFrameWidgetBase : public WebFrameWidget {
static void setIgnoreInputEvents(bool value) { s_ignoreInputEvents = value; }
static bool ignoreInputEvents() { return s_ignoreInputEvents; }
+ // WebWidget methods.
+ void didAcquirePointerLock() override;
+ void didNotAcquirePointerLock() override;
+ void didLosePointerLock() override;
+
protected:
enum DragAction { DragEnter, DragOver };
@@ -109,10 +114,16 @@ class WebFrameWidgetBase : public WebFrameWidget {
// current drop target in this WebView (the drop target can accept the drop).
WebDragOperation m_dragOperation = WebDragOperationNone;
+ // Helper function to process events while pointer locked.
+ void pointerLockMouseEvent(const WebInputEvent&);
+
private:
void cancelDrag();
static bool s_ignoreInputEvents;
+ RefPtr<UserGestureToken> m_pointerLockGestureToken;
+
+ friend class WebViewImpl;
};
DEFINE_TYPE_CASTS(WebFrameWidgetBase, WebFrameWidget, widget, true, true);
« no previous file with comments | « no previous file | third_party/WebKit/Source/web/WebFrameWidgetBase.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698