Chromium Code Reviews| 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 "config.h" | 5 #include "config.h" |
| 6 #include "web/RemoteFrameClientImpl.h" | 6 #include "web/RemoteFrameClientImpl.h" |
| 7 | 7 |
| 8 #include "core/events/KeyboardEvent.h" | 8 #include "core/events/KeyboardEvent.h" |
| 9 #include "core/events/MouseEvent.h" | 9 #include "core/events/MouseEvent.h" |
| 10 #include "core/events/WheelEvent.h" | 10 #include "core/events/WheelEvent.h" |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 48 // Clear our reference to RemoteFrame at the very end, in case the client | 48 // Clear our reference to RemoteFrame at the very end, in case the client |
| 49 // refers to it. | 49 // refers to it. |
| 50 m_webFrame->setCoreFrame(nullptr); | 50 m_webFrame->setCoreFrame(nullptr); |
| 51 } | 51 } |
| 52 | 52 |
| 53 Frame* RemoteFrameClientImpl::opener() const | 53 Frame* RemoteFrameClientImpl::opener() const |
| 54 { | 54 { |
| 55 return toCoreFrame(m_webFrame->opener()); | 55 return toCoreFrame(m_webFrame->opener()); |
| 56 } | 56 } |
| 57 | 57 |
| 58 void RemoteFrameClientImpl::setOpener(Frame*) | 58 void RemoteFrameClientImpl::setOpener(Frame* opener) |
| 59 { | 59 { |
| 60 // FIXME: Implement. | 60 m_webFrame->setOpener(WebFrame::fromFrame(opener)); |
|
nasko
2015/06/23 14:18:51
Is there a way to avoid duplicating this from Fram
dcheng
2015/06/23 18:20:43
It'd be tricky, since you'd have a diamond inherit
| |
| 61 } | 61 } |
| 62 | 62 |
| 63 Frame* RemoteFrameClientImpl::parent() const | 63 Frame* RemoteFrameClientImpl::parent() const |
| 64 { | 64 { |
| 65 return toCoreFrame(m_webFrame->parent()); | 65 return toCoreFrame(m_webFrame->parent()); |
| 66 } | 66 } |
| 67 | 67 |
| 68 Frame* RemoteFrameClientImpl::top() const | 68 Frame* RemoteFrameClientImpl::top() const |
| 69 { | 69 { |
| 70 return toCoreFrame(m_webFrame->top()); | 70 return toCoreFrame(m_webFrame->top()); |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 126 webEvent = adoptPtr(new WebMouseWheelEventBuilder(m_webFrame->frame()->v iew(), toCoreFrame(m_webFrame)->ownerLayoutObject(), *static_cast<WheelEvent*>(e vent))); | 126 webEvent = adoptPtr(new WebMouseWheelEventBuilder(m_webFrame->frame()->v iew(), toCoreFrame(m_webFrame)->ownerLayoutObject(), *static_cast<WheelEvent*>(e vent))); |
| 127 | 127 |
| 128 // Other or internal Blink events should not be forwarded. | 128 // Other or internal Blink events should not be forwarded. |
| 129 if (!webEvent || webEvent->type == WebInputEvent::Undefined) | 129 if (!webEvent || webEvent->type == WebInputEvent::Undefined) |
| 130 return; | 130 return; |
| 131 | 131 |
| 132 m_webFrame->client()->forwardInputEvent(webEvent.get()); | 132 m_webFrame->client()->forwardInputEvent(webEvent.get()); |
| 133 } | 133 } |
| 134 | 134 |
| 135 } // namespace blink | 135 } // namespace blink |
| OLD | NEW |