| 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 17 matching lines...) Expand all Loading... |
| 28 | 28 |
| 29 bool RemoteFrameClientImpl::inShadowTree() const | 29 bool RemoteFrameClientImpl::inShadowTree() const |
| 30 { | 30 { |
| 31 return m_webFrame->inShadowTree(); | 31 return m_webFrame->inShadowTree(); |
| 32 } | 32 } |
| 33 | 33 |
| 34 void RemoteFrameClientImpl::willBeDetached() | 34 void RemoteFrameClientImpl::willBeDetached() |
| 35 { | 35 { |
| 36 } | 36 } |
| 37 | 37 |
| 38 void RemoteFrameClientImpl::detached(FrameDetachType type) | 38 void RemoteFrameClientImpl::detached() |
| 39 { | 39 { |
| 40 // Alert the client that the frame is being detached. | 40 // Alert the client that the frame is being detached. |
| 41 RefPtrWillBeRawPtr<WebRemoteFrameImpl> protector(m_webFrame); | 41 RefPtrWillBeRawPtr<WebRemoteFrameImpl> protector(m_webFrame); |
| 42 | 42 |
| 43 WebRemoteFrameClient* client = m_webFrame->client(); | 43 WebRemoteFrameClient* client = m_webFrame->client(); |
| 44 if (!client) | 44 if (!client) |
| 45 return; | 45 return; |
| 46 | 46 |
| 47 client->frameDetached(static_cast<WebRemoteFrameClient::DetachType>(type)); | 47 client->frameDetached(); |
| 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 |
| (...skipping 68 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 |