| 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 "core/frame/RemoteFrameView.h" | 5 #include "core/frame/RemoteFrameView.h" |
| 6 | 6 |
| 7 #include "core/dom/IntersectionObserverEntry.h" | 7 #include "core/dom/IntersectionObserverEntry.h" |
| 8 #include "core/frame/FrameView.h" | 8 #include "core/frame/FrameView.h" |
| 9 #include "core/frame/LocalFrame.h" | 9 #include "core/frame/LocalFrame.h" |
| 10 #include "core/frame/RemoteFrame.h" | 10 #include "core/frame/RemoteFrame.h" |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 new_rect = Parent()->ConvertToRootFrame( | 108 new_rect = Parent()->ConvertToRootFrame( |
| 109 ToFrameView(Parent())->ContentsToFrame(new_rect)); | 109 ToFrameView(Parent())->ContentsToFrame(new_rect)); |
| 110 remote_frame_->Client()->FrameRectsChanged(new_rect); | 110 remote_frame_->Client()->FrameRectsChanged(new_rect); |
| 111 | 111 |
| 112 UpdateRemoteViewportIntersection(); | 112 UpdateRemoteViewportIntersection(); |
| 113 } | 113 } |
| 114 | 114 |
| 115 void RemoteFrameView::Hide() { | 115 void RemoteFrameView::Hide() { |
| 116 SetSelfVisible(false); | 116 SetSelfVisible(false); |
| 117 | 117 |
| 118 FrameViewBase::Hide(); | |
| 119 | |
| 120 remote_frame_->Client()->VisibilityChanged(false); | 118 remote_frame_->Client()->VisibilityChanged(false); |
| 121 } | 119 } |
| 122 | 120 |
| 123 void RemoteFrameView::Show() { | 121 void RemoteFrameView::Show() { |
| 124 SetSelfVisible(true); | 122 SetSelfVisible(true); |
| 125 | 123 |
| 126 FrameViewBase::Show(); | |
| 127 | |
| 128 remote_frame_->Client()->VisibilityChanged(true); | 124 remote_frame_->Client()->VisibilityChanged(true); |
| 129 } | 125 } |
| 130 | 126 |
| 131 void RemoteFrameView::SetParentVisible(bool visible) { | 127 void RemoteFrameView::SetParentVisible(bool visible) { |
| 132 if (IsParentVisible() == visible) | 128 if (IsParentVisible() == visible) |
| 133 return; | 129 return; |
| 134 | 130 |
| 135 FrameViewBase::SetParentVisible(visible); | 131 FrameViewBase::SetParentVisible(visible); |
| 136 if (!IsSelfVisible()) | 132 if (!IsSelfVisible()) |
| 137 return; | 133 return; |
| 138 | 134 |
| 139 remote_frame_->Client()->VisibilityChanged(IsVisible()); | 135 remote_frame_->Client()->VisibilityChanged(IsVisible()); |
| 140 } | 136 } |
| 141 | 137 |
| 142 DEFINE_TRACE(RemoteFrameView) { | 138 DEFINE_TRACE(RemoteFrameView) { |
| 143 visitor->Trace(remote_frame_); | 139 visitor->Trace(remote_frame_); |
| 144 FrameViewBase::Trace(visitor); | 140 FrameViewBase::Trace(visitor); |
| 145 } | 141 } |
| 146 | 142 |
| 147 } // namespace blink | 143 } // namespace blink |
| OLD | NEW |