| 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 <memory> | 7 #include <memory> |
| 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 15 matching lines...) Expand all Loading... |
| 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 LocalFrameClientImpl 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()->GetFrame() : nullptr; | 36 return frame ? WebFrame::CoreFrame(frame) : nullptr; |
| 37 } | 37 } |
| 38 | 38 |
| 39 } // namespace | 39 } // namespace |
| 40 | 40 |
| 41 RemoteFrameClientImpl::RemoteFrameClientImpl(WebRemoteFrameImpl* web_frame) | 41 RemoteFrameClientImpl::RemoteFrameClientImpl(WebRemoteFrameImpl* web_frame) |
| 42 : web_frame_(web_frame) {} | 42 : web_frame_(web_frame) {} |
| 43 | 43 |
| 44 RemoteFrameClientImpl* RemoteFrameClientImpl::Create( | 44 RemoteFrameClientImpl* RemoteFrameClientImpl::Create( |
| 45 WebRemoteFrameImpl* web_frame) { | 45 WebRemoteFrameImpl* web_frame) { |
| 46 return new RemoteFrameClientImpl(web_frame); | 46 return new RemoteFrameClientImpl(web_frame); |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 LocalFrame* source) { | 149 LocalFrame* source) { |
| 150 web_frame_->Client()->AdvanceFocus(type, | 150 web_frame_->Client()->AdvanceFocus(type, |
| 151 WebLocalFrameImpl::FromFrame(source)); | 151 WebLocalFrameImpl::FromFrame(source)); |
| 152 } | 152 } |
| 153 | 153 |
| 154 void RemoteFrameClientImpl::VisibilityChanged(bool visible) { | 154 void RemoteFrameClientImpl::VisibilityChanged(bool visible) { |
| 155 web_frame_->Client()->VisibilityChanged(visible); | 155 web_frame_->Client()->VisibilityChanged(visible); |
| 156 } | 156 } |
| 157 | 157 |
| 158 } // namespace blink | 158 } // namespace blink |
| OLD | NEW |