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

Side by Side Diff: third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp

Issue 1980133002: Implement pointer lock API for out-of-process iframes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 6 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) 2014 Google Inc. All rights reserved. 2 * Copyright (C) 2014 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 29 matching lines...) Expand all
40 #include "core/frame/RemoteFrame.h" 40 #include "core/frame/RemoteFrame.h"
41 #include "core/frame/Settings.h" 41 #include "core/frame/Settings.h"
42 #include "core/frame/VisualViewport.h" 42 #include "core/frame/VisualViewport.h"
43 #include "core/input/EventHandler.h" 43 #include "core/input/EventHandler.h"
44 #include "core/layout/LayoutView.h" 44 #include "core/layout/LayoutView.h"
45 #include "core/layout/api/LayoutViewItem.h" 45 #include "core/layout/api/LayoutViewItem.h"
46 #include "core/layout/compositing/PaintLayerCompositor.h" 46 #include "core/layout/compositing/PaintLayerCompositor.h"
47 #include "core/page/ContextMenuController.h" 47 #include "core/page/ContextMenuController.h"
48 #include "core/page/FocusController.h" 48 #include "core/page/FocusController.h"
49 #include "core/page/Page.h" 49 #include "core/page/Page.h"
50 #include "core/page/PointerLockController.h"
50 #include "platform/KeyboardCodes.h" 51 #include "platform/KeyboardCodes.h"
51 #include "platform/graphics/CompositorMutatorClient.h" 52 #include "platform/graphics/CompositorMutatorClient.h"
52 #include "public/platform/WebFrameScheduler.h" 53 #include "public/platform/WebFrameScheduler.h"
53 #include "public/web/WebWidgetClient.h" 54 #include "public/web/WebWidgetClient.h"
54 #include "web/CompositorMutatorImpl.h" 55 #include "web/CompositorMutatorImpl.h"
55 #include "web/CompositorProxyClientImpl.h" 56 #include "web/CompositorProxyClientImpl.h"
56 #include "web/ContextMenuAllowedScope.h" 57 #include "web/ContextMenuAllowedScope.h"
57 #include "web/WebDevToolsAgentImpl.h" 58 #include "web/WebDevToolsAgentImpl.h"
58 #include "web/WebInputEventConversion.h" 59 #include "web/WebInputEventConversion.h"
59 #include "web/WebLocalFrameImpl.h" 60 #include "web/WebLocalFrameImpl.h"
(...skipping 578 matching lines...) Expand 10 before | Expand all | Expand 10 after
638 m_layerTreeView = nullptr; 639 m_layerTreeView = nullptr;
639 m_layerTreeViewClosed = true; 640 m_layerTreeViewClosed = true;
640 } 641 }
641 642
642 void WebFrameWidgetImpl::didChangeWindowResizerRect() 643 void WebFrameWidgetImpl::didChangeWindowResizerRect()
643 { 644 {
644 if (m_localRoot->frameView()) 645 if (m_localRoot->frameView())
645 m_localRoot->frameView()->windowResizerRectChanged(); 646 m_localRoot->frameView()->windowResizerRectChanged();
646 } 647 }
647 648
649 void WebFrameWidgetImpl::didAcquirePointerLock()
650 {
651 page()->pointerLockController().didAcquirePointerLock();
652 }
653
654 void WebFrameWidgetImpl::didNotAcquirePointerLock()
655 {
656 page()->pointerLockController().didNotAcquirePointerLock();
657 }
658
659 void WebFrameWidgetImpl::didLosePointerLock()
660 {
661 page()->pointerLockController().didLosePointerLock();
662 }
663
648 void WebFrameWidgetImpl::handleMouseLeave(LocalFrame& mainFrame, const WebMouseE vent& event) 664 void WebFrameWidgetImpl::handleMouseLeave(LocalFrame& mainFrame, const WebMouseE vent& event)
649 { 665 {
650 // FIXME: WebWidget doesn't have the method below. 666 // FIXME: WebWidget doesn't have the method below.
651 // m_client->setMouseOverURL(WebURL()); 667 // m_client->setMouseOverURL(WebURL());
652 PageWidgetEventHandler::handleMouseLeave(mainFrame, event); 668 PageWidgetEventHandler::handleMouseLeave(mainFrame, event);
653 } 669 }
654 670
655 void WebFrameWidgetImpl::handleMouseDown(LocalFrame& mainFrame, const WebMouseEv ent& event) 671 void WebFrameWidgetImpl::handleMouseDown(LocalFrame& mainFrame, const WebMouseEv ent& event)
656 { 672 {
657 // Take capture on a mouse down on a plugin so we can send it mouse events. 673 // Take capture on a mouse down on a plugin so we can send it mouse events.
(...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after
1110 1126
1111 HitTestResult WebFrameWidgetImpl::hitTestResultForRootFramePos(const IntPoint& p osInRootFrame) 1127 HitTestResult WebFrameWidgetImpl::hitTestResultForRootFramePos(const IntPoint& p osInRootFrame)
1112 { 1128 {
1113 IntPoint docPoint(m_localRoot->frame()->view()->rootFrameToContents(posInRoo tFrame)); 1129 IntPoint docPoint(m_localRoot->frame()->view()->rootFrameToContents(posInRoo tFrame));
1114 HitTestResult result = m_localRoot->frame()->eventHandler().hitTestResultAtP oint(docPoint, HitTestRequest::ReadOnly | HitTestRequest::Active); 1130 HitTestResult result = m_localRoot->frame()->eventHandler().hitTestResultAtP oint(docPoint, HitTestRequest::ReadOnly | HitTestRequest::Active);
1115 result.setToShadowHostIfInUserAgentShadowRoot(); 1131 result.setToShadowHostIfInUserAgentShadowRoot();
1116 return result; 1132 return result;
1117 } 1133 }
1118 1134
1119 } // namespace blink 1135 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/WebFrameWidgetImpl.h ('k') | third_party/WebKit/Source/web/WebViewImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698