Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 Loading... | |
| 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 if (page()) | |
|
dcheng
2016/06/04 05:28:56
Is it actually possible to call this when there's
lfg
2016/06/06 20:09:43
No, I don't think it's possible. This check is unn
| |
| 652 page()->pointerLockController().didAcquirePointerLock(); | |
| 653 } | |
| 654 | |
| 655 void WebFrameWidgetImpl::didNotAcquirePointerLock() | |
| 656 { | |
| 657 if (page()) | |
| 658 page()->pointerLockController().didNotAcquirePointerLock(); | |
| 659 } | |
| 660 | |
| 661 void WebFrameWidgetImpl::didLosePointerLock() | |
| 662 { | |
| 663 if (page()) | |
| 664 page()->pointerLockController().didLosePointerLock(); | |
| 665 } | |
| 666 | |
| 648 void WebFrameWidgetImpl::handleMouseLeave(LocalFrame& mainFrame, const WebMouseE vent& event) | 667 void WebFrameWidgetImpl::handleMouseLeave(LocalFrame& mainFrame, const WebMouseE vent& event) |
| 649 { | 668 { |
| 650 // FIXME: WebWidget doesn't have the method below. | 669 // FIXME: WebWidget doesn't have the method below. |
| 651 // m_client->setMouseOverURL(WebURL()); | 670 // m_client->setMouseOverURL(WebURL()); |
| 652 PageWidgetEventHandler::handleMouseLeave(mainFrame, event); | 671 PageWidgetEventHandler::handleMouseLeave(mainFrame, event); |
| 653 } | 672 } |
| 654 | 673 |
| 655 void WebFrameWidgetImpl::handleMouseDown(LocalFrame& mainFrame, const WebMouseEv ent& event) | 674 void WebFrameWidgetImpl::handleMouseDown(LocalFrame& mainFrame, const WebMouseEv ent& event) |
| 656 { | 675 { |
| 657 // Take capture on a mouse down on a plugin so we can send it mouse events. | 676 // 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 Loading... | |
| 1110 | 1129 |
| 1111 HitTestResult WebFrameWidgetImpl::hitTestResultForRootFramePos(const IntPoint& p osInRootFrame) | 1130 HitTestResult WebFrameWidgetImpl::hitTestResultForRootFramePos(const IntPoint& p osInRootFrame) |
| 1112 { | 1131 { |
| 1113 IntPoint docPoint(m_localRoot->frame()->view()->rootFrameToContents(posInRoo tFrame)); | 1132 IntPoint docPoint(m_localRoot->frame()->view()->rootFrameToContents(posInRoo tFrame)); |
| 1114 HitTestResult result = m_localRoot->frame()->eventHandler().hitTestResultAtP oint(docPoint, HitTestRequest::ReadOnly | HitTestRequest::Active); | 1133 HitTestResult result = m_localRoot->frame()->eventHandler().hitTestResultAtP oint(docPoint, HitTestRequest::ReadOnly | HitTestRequest::Active); |
| 1115 result.setToShadowHostIfInUserAgentShadowRoot(); | 1134 result.setToShadowHostIfInUserAgentShadowRoot(); |
| 1116 return result; | 1135 return result; |
| 1117 } | 1136 } |
| 1118 | 1137 |
| 1119 } // namespace blink | 1138 } // namespace blink |
| OLD | NEW |