| 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 12 matching lines...) Expand all Loading... |
| 23 #include <memory> | 23 #include <memory> |
| 24 | 24 |
| 25 namespace blink { | 25 namespace blink { |
| 26 | 26 |
| 27 namespace { | 27 namespace { |
| 28 | 28 |
| 29 // Convenience helper for frame tree helpers in FrameClient to reduce the amount | 29 // Convenience helper for frame tree helpers in FrameClient to reduce the amount |
| 30 // of null-checking boilerplate code. Since the frame tree is maintained in the | 30 // of null-checking boilerplate code. Since the frame tree is maintained in the |
| 31 // web/ layer, the frame tree helpers often have to deal with null WebFrames: | 31 // web/ layer, the frame tree helpers often have to deal with null WebFrames: |
| 32 // for example, a frame with no parent will return null for WebFrame::parent(). | 32 // for example, a frame with no parent will return null for WebFrame::parent(). |
| 33 // TODO(dcheng): Remove duplication between FrameLoaderClientImpl and | 33 // TODO(dcheng): Remove duplication between LocalFrameClientImpl and |
| 34 // RemoteFrameClientImpl somehow... | 34 // RemoteFrameClientImpl somehow... |
| 35 Frame* toCoreFrame(WebFrame* frame) { | 35 Frame* toCoreFrame(WebFrame* frame) { |
| 36 return frame ? frame->toImplBase()->frame() : nullptr; | 36 return frame ? frame->toImplBase()->frame() : nullptr; |
| 37 } | 37 } |
| 38 | 38 |
| 39 } // namespace | 39 } // namespace |
| 40 | 40 |
| 41 RemoteFrameClientImpl::RemoteFrameClientImpl(WebRemoteFrameImpl* webFrame) | 41 RemoteFrameClientImpl::RemoteFrameClientImpl(WebRemoteFrameImpl* webFrame) |
| 42 : m_webFrame(webFrame) {} | 42 : m_webFrame(webFrame) {} |
| 43 | 43 |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 LocalFrame* source) { | 184 LocalFrame* source) { |
| 185 m_webFrame->client()->advanceFocus(type, | 185 m_webFrame->client()->advanceFocus(type, |
| 186 WebLocalFrameImpl::fromFrame(source)); | 186 WebLocalFrameImpl::fromFrame(source)); |
| 187 } | 187 } |
| 188 | 188 |
| 189 void RemoteFrameClientImpl::visibilityChanged(bool visible) { | 189 void RemoteFrameClientImpl::visibilityChanged(bool visible) { |
| 190 m_webFrame->client()->visibilityChanged(visible); | 190 m_webFrame->client()->visibilityChanged(visible); |
| 191 } | 191 } |
| 192 | 192 |
| 193 } // namespace blink | 193 } // namespace blink |
| OLD | NEW |