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

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: removing one more override Created 4 years, 7 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 28 matching lines...) Expand all
39 #include "core/frame/FrameView.h" 39 #include "core/frame/FrameView.h"
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/input/EventHandler.h" 42 #include "core/input/EventHandler.h"
43 #include "core/layout/LayoutView.h" 43 #include "core/layout/LayoutView.h"
44 #include "core/layout/api/LayoutViewItem.h" 44 #include "core/layout/api/LayoutViewItem.h"
45 #include "core/layout/compositing/PaintLayerCompositor.h" 45 #include "core/layout/compositing/PaintLayerCompositor.h"
46 #include "core/page/ContextMenuController.h" 46 #include "core/page/ContextMenuController.h"
47 #include "core/page/FocusController.h" 47 #include "core/page/FocusController.h"
48 #include "core/page/Page.h" 48 #include "core/page/Page.h"
49 #include "core/page/PointerLockController.h"
49 #include "platform/KeyboardCodes.h" 50 #include "platform/KeyboardCodes.h"
50 #include "public/platform/WebFrameScheduler.h" 51 #include "public/platform/WebFrameScheduler.h"
51 #include "public/web/WebWidgetClient.h" 52 #include "public/web/WebWidgetClient.h"
52 #include "web/ContextMenuAllowedScope.h" 53 #include "web/ContextMenuAllowedScope.h"
53 #include "web/WebDevToolsAgentImpl.h" 54 #include "web/WebDevToolsAgentImpl.h"
54 #include "web/WebInputEventConversion.h" 55 #include "web/WebInputEventConversion.h"
55 #include "web/WebLocalFrameImpl.h" 56 #include "web/WebLocalFrameImpl.h"
56 #include "web/WebPluginContainerImpl.h" 57 #include "web/WebPluginContainerImpl.h"
57 #include "web/WebRemoteFrameImpl.h" 58 #include "web/WebRemoteFrameImpl.h"
58 #include "web/WebViewFrameWidget.h" 59 #include "web/WebViewFrameWidget.h"
(...skipping 560 matching lines...) Expand 10 before | Expand all | Expand 10 after
619 m_layerTreeView = nullptr; 620 m_layerTreeView = nullptr;
620 m_layerTreeViewClosed = true; 621 m_layerTreeViewClosed = true;
621 } 622 }
622 623
623 void WebFrameWidgetImpl::didChangeWindowResizerRect() 624 void WebFrameWidgetImpl::didChangeWindowResizerRect()
624 { 625 {
625 if (m_localRoot->frameView()) 626 if (m_localRoot->frameView())
626 m_localRoot->frameView()->windowResizerRectChanged(); 627 m_localRoot->frameView()->windowResizerRectChanged();
627 } 628 }
628 629
630 void WebFrameWidgetImpl::didAcquirePointerLock()
631 {
632 if (page())
633 page()->pointerLockController().didAcquirePointerLock();
634 }
635
636 void WebFrameWidgetImpl::didNotAcquirePointerLock()
637 {
638 if (page())
639 page()->pointerLockController().didNotAcquirePointerLock();
640 }
641
642 void WebFrameWidgetImpl::didLosePointerLock()
643 {
644 if (page())
645 page()->pointerLockController().didLosePointerLock();
646 }
647
629 void WebFrameWidgetImpl::handleMouseLeave(LocalFrame& mainFrame, const WebMouseE vent& event) 648 void WebFrameWidgetImpl::handleMouseLeave(LocalFrame& mainFrame, const WebMouseE vent& event)
630 { 649 {
631 // FIXME: WebWidget doesn't have the method below. 650 // FIXME: WebWidget doesn't have the method below.
632 // m_client->setMouseOverURL(WebURL()); 651 // m_client->setMouseOverURL(WebURL());
633 PageWidgetEventHandler::handleMouseLeave(mainFrame, event); 652 PageWidgetEventHandler::handleMouseLeave(mainFrame, event);
634 } 653 }
635 654
636 void WebFrameWidgetImpl::handleMouseDown(LocalFrame& mainFrame, const WebMouseEv ent& event) 655 void WebFrameWidgetImpl::handleMouseDown(LocalFrame& mainFrame, const WebMouseEv ent& event)
637 { 656 {
638 // Take capture on a mouse down on a plugin so we can send it mouse events. 657 // Take capture on a mouse down on a plugin so we can send it mouse events.
(...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after
1090 1109
1091 HitTestResult WebFrameWidgetImpl::hitTestResultForRootFramePos(const IntPoint& p osInRootFrame) 1110 HitTestResult WebFrameWidgetImpl::hitTestResultForRootFramePos(const IntPoint& p osInRootFrame)
1092 { 1111 {
1093 IntPoint docPoint(m_localRoot->frame()->view()->rootFrameToContents(posInRoo tFrame)); 1112 IntPoint docPoint(m_localRoot->frame()->view()->rootFrameToContents(posInRoo tFrame));
1094 HitTestResult result = m_localRoot->frame()->eventHandler().hitTestResultAtP oint(docPoint, HitTestRequest::ReadOnly | HitTestRequest::Active); 1113 HitTestResult result = m_localRoot->frame()->eventHandler().hitTestResultAtP oint(docPoint, HitTestRequest::ReadOnly | HitTestRequest::Active);
1095 result.setToShadowHostIfInUserAgentShadowRoot(); 1114 result.setToShadowHostIfInUserAgentShadowRoot();
1096 return result; 1115 return result;
1097 } 1116 }
1098 1117
1099 } // namespace blink 1118 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698