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

Side by Side Diff: third_party/WebKit/Source/web/WebViewImpl.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 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 547 matching lines...) Expand 10 before | Expand all | Expand 10 after
558 void updateLayerTreeBackgroundColor(); 558 void updateLayerTreeBackgroundColor();
559 void updateDeviceEmulationTransform(); 559 void updateDeviceEmulationTransform();
560 void updateLayerTreeDeviceScaleFactor(); 560 void updateLayerTreeDeviceScaleFactor();
561 561
562 // Helper function: Widens the width of |source| by the specified margins 562 // Helper function: Widens the width of |source| by the specified margins
563 // while keeping it smaller than page width. 563 // while keeping it smaller than page width.
564 WebRect widenRectWithinPageBounds(const WebRect& source, 564 WebRect widenRectWithinPageBounds(const WebRect& source,
565 int targetMargin, 565 int targetMargin,
566 int minimumMargin); 566 int minimumMargin);
567 567
568 void pointerLockMouseEvent(const WebInputEvent&);
569
570 // PageWidgetEventHandler functions 568 // PageWidgetEventHandler functions
571 void handleMouseLeave(LocalFrame&, const WebMouseEvent&) override; 569 void handleMouseLeave(LocalFrame&, const WebMouseEvent&) override;
572 void handleMouseDown(LocalFrame&, const WebMouseEvent&) override; 570 void handleMouseDown(LocalFrame&, const WebMouseEvent&) override;
573 void handleMouseUp(LocalFrame&, const WebMouseEvent&) override; 571 void handleMouseUp(LocalFrame&, const WebMouseEvent&) override;
574 WebInputEventResult handleMouseWheel(LocalFrame&, 572 WebInputEventResult handleMouseWheel(LocalFrame&,
575 const WebMouseWheelEvent&) override; 573 const WebMouseWheelEvent&) override;
576 WebInputEventResult handleGestureEvent(const WebGestureEvent&) override; 574 WebInputEventResult handleGestureEvent(const WebGestureEvent&) override;
577 WebInputEventResult handleKeyEvent(const WebKeyboardEvent&) override; 575 WebInputEventResult handleKeyEvent(const WebKeyboardEvent&) override;
578 WebInputEventResult handleCharEvent(const WebKeyboardEvent&) override; 576 WebInputEventResult handleCharEvent(const WebKeyboardEvent&) override;
579 577
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
681 // Whether the webview is rendering transparently. 679 // Whether the webview is rendering transparently.
682 bool m_isTransparent; 680 bool m_isTransparent;
683 681
684 // Whether the user can press tab to focus links. 682 // Whether the user can press tab to focus links.
685 bool m_tabsToLinks; 683 bool m_tabsToLinks;
686 684
687 // If set, the (plugin) node which has mouse capture. 685 // If set, the (plugin) node which has mouse capture.
688 Persistent<Node> m_mouseCaptureNode; 686 Persistent<Node> m_mouseCaptureNode;
689 RefPtr<UserGestureToken> m_mouseCaptureGestureToken; 687 RefPtr<UserGestureToken> m_mouseCaptureGestureToken;
690 688
691 RefPtr<UserGestureToken> m_pointerLockGestureToken;
692
693 WebLayerTreeView* m_layerTreeView; 689 WebLayerTreeView* m_layerTreeView;
694 std::unique_ptr<CompositorAnimationHost> m_animationHost; 690 std::unique_ptr<CompositorAnimationHost> m_animationHost;
695 691
696 WebLayer* m_rootLayer; 692 WebLayer* m_rootLayer;
697 GraphicsLayer* m_rootGraphicsLayer; 693 GraphicsLayer* m_rootGraphicsLayer;
698 GraphicsLayer* m_visualViewportContainerLayer; 694 GraphicsLayer* m_visualViewportContainerLayer;
699 bool m_matchesHeuristicsForGpuRasterization; 695 bool m_matchesHeuristicsForGpuRasterization;
700 static const WebInputEvent* m_currentInputEvent; 696 static const WebInputEvent* m_currentInputEvent;
701 697
702 MediaKeysClientImpl m_mediaKeysClientImpl; 698 MediaKeysClientImpl m_mediaKeysClientImpl;
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
744 Persistent<ResizeViewportAnchor> m_resizeViewportAnchor; 740 Persistent<ResizeViewportAnchor> m_resizeViewportAnchor;
745 }; 741 };
746 742
747 // We have no ways to check if the specified WebView is an instance of 743 // We have no ways to check if the specified WebView is an instance of
748 // WebViewImpl because WebViewImpl is the only implementation of WebView. 744 // WebViewImpl because WebViewImpl is the only implementation of WebView.
749 DEFINE_TYPE_CASTS(WebViewImpl, WebView, webView, true, true); 745 DEFINE_TYPE_CASTS(WebViewImpl, WebView, webView, true, true);
750 746
751 } // namespace blink 747 } // namespace blink
752 748
753 #endif 749 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/WebViewFrameWidget.cpp ('k') | third_party/WebKit/Source/web/WebViewImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698