| 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" |
| 11 #include "core/frame/RemoteFrame.h" | 11 #include "core/frame/RemoteFrame.h" |
| 12 #include "core/frame/RemoteFrameView.h" | 12 #include "core/frame/RemoteFrameView.h" |
| 13 #include "core/layout/LayoutPart.h" | 13 #include "core/layout/LayoutPart.h" |
| 14 #include "platform/exported/WrappedResourceRequest.h" | 14 #include "platform/exported/WrappedResourceRequest.h" |
| 15 #include "platform/weborigin/SecurityOrigin.h" | 15 #include "platform/weborigin/SecurityOrigin.h" |
| 16 #include "platform/weborigin/SecurityPolicy.h" | 16 #include "platform/weborigin/SecurityPolicy.h" |
| 17 #include "public/web/WebRemoteFrameClient.h" | 17 #include "public/web/WebRemoteFrameClient.h" |
| 18 #include "web/WebInputEventConversion.h" | 18 #include "web/WebInputEventConversion.h" |
| 19 #include "web/WebLocalFrameImpl.h" | 19 #include "web/WebLocalFrameImpl.h" |
| 20 #include "web/WebRemoteFrameImpl.h" | 20 #include "web/WebRemoteFrameImpl.h" |
| 21 | 21 |
| 22 namespace blink { | 22 namespace blink { |
| 23 | 23 |
| 24 RemoteFrameClientImpl::RemoteFrameClientImpl(WebRemoteFrameImpl* webFrame) | 24 RemoteFrameClientImpl::RemoteFrameClientImpl(WebRemoteFrameImpl* webFrame) |
| 25 : m_webFrame(webFrame) | 25 : m_webFrame(webFrame) |
| 26 { | 26 { |
| 27 } | 27 } |
| 28 | 28 |
| 29 bool RemoteFrameClientImpl::inShadowTree() const |
| 30 { |
| 31 return m_webFrame->inShadowTree(); |
| 32 } |
| 33 |
| 29 void RemoteFrameClientImpl::willBeDetached() | 34 void RemoteFrameClientImpl::willBeDetached() |
| 30 { | 35 { |
| 31 } | 36 } |
| 32 | 37 |
| 33 void RemoteFrameClientImpl::detached() | 38 void RemoteFrameClientImpl::detached() |
| 34 { | 39 { |
| 35 // Alert the client that the frame is being detached. | 40 // Alert the client that the frame is being detached. |
| 36 RefPtrWillBeRawPtr<WebRemoteFrameImpl> protector(m_webFrame); | 41 RefPtrWillBeRawPtr<WebRemoteFrameImpl> protector(m_webFrame); |
| 37 | 42 |
| 38 WebRemoteFrameClient* client = m_webFrame->client(); | 43 WebRemoteFrameClient* client = m_webFrame->client(); |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 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))); |
| 122 | 127 |
| 123 // Other or internal Blink events should not be forwarded. | 128 // Other or internal Blink events should not be forwarded. |
| 124 if (!webEvent || webEvent->type == WebInputEvent::Undefined) | 129 if (!webEvent || webEvent->type == WebInputEvent::Undefined) |
| 125 return; | 130 return; |
| 126 | 131 |
| 127 m_webFrame->client()->forwardInputEvent(webEvent.get()); | 132 m_webFrame->client()->forwardInputEvent(webEvent.get()); |
| 128 } | 133 } |
| 129 | 134 |
| 130 } // namespace blink | 135 } // namespace blink |
| OLD | NEW |