| 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/RemoteFrame.h" | 5 #include "core/frame/RemoteFrame.h" |
| 6 | 6 |
| 7 #include "bindings/core/v8/WindowProxy.h" | 7 #include "bindings/core/v8/WindowProxy.h" |
| 8 #include "bindings/core/v8/WindowProxyManager.h" | 8 #include "bindings/core/v8/WindowProxyManager.h" |
| 9 #include "core/dom/RemoteSecurityContext.h" | 9 #include "core/dom/RemoteSecurityContext.h" |
| 10 #include "core/frame/LocalFrame.h" | 10 #include "core/frame/LocalFrame.h" |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 } | 130 } |
| 131 | 131 |
| 132 void RemoteFrame::setDocumentHasReceivedUserGesture() { | 132 void RemoteFrame::setDocumentHasReceivedUserGesture() { |
| 133 client()->setHasReceivedUserGesture(); | 133 client()->setHasReceivedUserGesture(); |
| 134 } | 134 } |
| 135 | 135 |
| 136 void RemoteFrame::forwardInputEvent(Event* event) { | 136 void RemoteFrame::forwardInputEvent(Event* event) { |
| 137 client()->forwardInputEvent(event); | 137 client()->forwardInputEvent(event); |
| 138 } | 138 } |
| 139 | 139 |
| 140 void RemoteFrame::frameRectsChanged(const IntRect& frameRect) { | |
| 141 client()->frameRectsChanged(frameRect); | |
| 142 } | |
| 143 | |
| 144 void RemoteFrame::visibilityChanged(bool visible) { | |
| 145 if (client()) | |
| 146 client()->visibilityChanged(visible); | |
| 147 } | |
| 148 | |
| 149 void RemoteFrame::setView(RemoteFrameView* view) { | 140 void RemoteFrame::setView(RemoteFrameView* view) { |
| 150 // Oilpan: as RemoteFrameView performs no finalization actions, | 141 // Oilpan: as RemoteFrameView performs no finalization actions, |
| 151 // no explicit dispose() of it needed here. (cf. FrameView::dispose().) | 142 // no explicit dispose() of it needed here. (cf. FrameView::dispose().) |
| 152 m_view = view; | 143 m_view = view; |
| 153 | 144 |
| 154 // ... the RemoteDOMWindow will need to be informed of detachment, | 145 // ... the RemoteDOMWindow will need to be informed of detachment, |
| 155 // as otherwise it will keep a strong reference back to this RemoteFrame. | 146 // as otherwise it will keep a strong reference back to this RemoteFrame. |
| 156 // That combined with wrappers (owned and kept alive by RemoteFrame) keeping | 147 // That combined with wrappers (owned and kept alive by RemoteFrame) keeping |
| 157 // persistent strong references to RemoteDOMWindow will prevent the GCing | 148 // persistent strong references to RemoteDOMWindow will prevent the GCing |
| 158 // of all these objects. Break the cycle by notifying of detachment. | 149 // of all these objects. Break the cycle by notifying of detachment. |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 FrameVector childrenToDetach; | 189 FrameVector childrenToDetach; |
| 199 childrenToDetach.reserveCapacity(tree().childCount()); | 190 childrenToDetach.reserveCapacity(tree().childCount()); |
| 200 for (Frame* child = tree().firstChild(); child; | 191 for (Frame* child = tree().firstChild(); child; |
| 201 child = child->tree().nextSibling()) | 192 child = child->tree().nextSibling()) |
| 202 childrenToDetach.append(child); | 193 childrenToDetach.append(child); |
| 203 for (const auto& child : childrenToDetach) | 194 for (const auto& child : childrenToDetach) |
| 204 child->detach(FrameDetachType::Remove); | 195 child->detach(FrameDetachType::Remove); |
| 205 } | 196 } |
| 206 | 197 |
| 207 } // namespace blink | 198 } // namespace blink |
| OLD | NEW |