| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "web/RemoteFrameClientImpl.h" | 5 #include "web/RemoteFrameClientImpl.h" |
| 6 | 6 |
| 7 #include "core/events/KeyboardEvent.h" | 7 #include "core/events/KeyboardEvent.h" |
| 8 #include "core/events/MouseEvent.h" | 8 #include "core/events/MouseEvent.h" |
| 9 #include "core/events/WheelEvent.h" | 9 #include "core/events/WheelEvent.h" |
| 10 #include "core/frame/RemoteFrame.h" | 10 #include "core/frame/RemoteFrame.h" |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 // anyway. | 148 // anyway. |
| 149 // See https://crbug.com/520705. | 149 // See https://crbug.com/520705. |
| 150 if (m_webFrame->toImplBase()->frame()->ownerLayoutItem().isNull()) | 150 if (m_webFrame->toImplBase()->frame()->ownerLayoutItem().isNull()) |
| 151 return; | 151 return; |
| 152 | 152 |
| 153 // This is only called when we have out-of-process iframes, which | 153 // This is only called when we have out-of-process iframes, which |
| 154 // need to forward input events across processes. | 154 // need to forward input events across processes. |
| 155 // FIXME: Add a check for out-of-process iframes enabled. | 155 // FIXME: Add a check for out-of-process iframes enabled. |
| 156 std::unique_ptr<WebInputEvent> webEvent; | 156 std::unique_ptr<WebInputEvent> webEvent; |
| 157 if (event->isKeyboardEvent()) | 157 if (event->isKeyboardEvent()) |
| 158 webEvent = wrapUnique( | 158 webEvent = WTF::wrapUnique( |
| 159 new WebKeyboardEventBuilder(*static_cast<KeyboardEvent*>(event))); | 159 new WebKeyboardEventBuilder(*static_cast<KeyboardEvent*>(event))); |
| 160 else if (event->isMouseEvent()) | 160 else if (event->isMouseEvent()) |
| 161 webEvent = wrapUnique(new WebMouseEventBuilder( | 161 webEvent = WTF::wrapUnique(new WebMouseEventBuilder( |
| 162 m_webFrame->frame()->view(), | 162 m_webFrame->frame()->view(), |
| 163 m_webFrame->toImplBase()->frame()->ownerLayoutItem(), | 163 m_webFrame->toImplBase()->frame()->ownerLayoutItem(), |
| 164 *static_cast<MouseEvent*>(event))); | 164 *static_cast<MouseEvent*>(event))); |
| 165 | 165 |
| 166 // Other or internal Blink events should not be forwarded. | 166 // Other or internal Blink events should not be forwarded. |
| 167 if (!webEvent || webEvent->type == WebInputEvent::Undefined) | 167 if (!webEvent || webEvent->type == WebInputEvent::Undefined) |
| 168 return; | 168 return; |
| 169 | 169 |
| 170 m_webFrame->client()->forwardInputEvent(webEvent.get()); | 170 m_webFrame->client()->forwardInputEvent(webEvent.get()); |
| 171 } | 171 } |
| (...skipping 10 matching lines...) Expand all Loading... |
| 182 | 182 |
| 183 void RemoteFrameClientImpl::visibilityChanged(bool visible) { | 183 void RemoteFrameClientImpl::visibilityChanged(bool visible) { |
| 184 m_webFrame->client()->visibilityChanged(visible); | 184 m_webFrame->client()->visibilityChanged(visible); |
| 185 } | 185 } |
| 186 | 186 |
| 187 void RemoteFrameClientImpl::setHasReceivedUserGesture() { | 187 void RemoteFrameClientImpl::setHasReceivedUserGesture() { |
| 188 m_webFrame->client()->setHasReceivedUserGesture(); | 188 m_webFrame->client()->setHasReceivedUserGesture(); |
| 189 } | 189 } |
| 190 | 190 |
| 191 } // namespace blink | 191 } // namespace blink |
| OLD | NEW |