| 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 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 if (event->isKeyboardEvent()) | 157 if (event->isKeyboardEvent()) |
| 158 webEvent = WTF::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 = WTF::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 } |
| 172 | 172 |
| 173 void RemoteFrameClientImpl::frameRectsChanged(const IntRect& frameRect) { | 173 void RemoteFrameClientImpl::frameRectsChanged(const IntRect& frameRect) { |
| 174 m_webFrame->client()->frameRectsChanged(frameRect); | 174 m_webFrame->client()->frameRectsChanged(frameRect); |
| 175 } | 175 } |
| 176 | 176 |
| 177 void RemoteFrameClientImpl::advanceFocus(WebFocusType type, | 177 void RemoteFrameClientImpl::advanceFocus(WebFocusType type, |
| 178 LocalFrame* source) { | 178 LocalFrame* source) { |
| 179 m_webFrame->client()->advanceFocus(type, | 179 m_webFrame->client()->advanceFocus(type, |
| 180 WebLocalFrameImpl::fromFrame(source)); | 180 WebLocalFrameImpl::fromFrame(source)); |
| 181 } | 181 } |
| 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 |