| 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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 } | 124 } |
| 125 | 125 |
| 126 void RemoteFrame::setDocumentHasReceivedUserGesture() { | 126 void RemoteFrame::setDocumentHasReceivedUserGesture() { |
| 127 client()->setHasReceivedUserGesture(); | 127 client()->setHasReceivedUserGesture(); |
| 128 } | 128 } |
| 129 | 129 |
| 130 void RemoteFrame::forwardInputEvent(Event* event) { | 130 void RemoteFrame::forwardInputEvent(Event* event) { |
| 131 client()->forwardInputEvent(event); | 131 client()->forwardInputEvent(event); |
| 132 } | 132 } |
| 133 | 133 |
| 134 void RemoteFrame::frameRectsChanged(const IntRect& frameRect) { | |
| 135 client()->frameRectsChanged(frameRect); | |
| 136 } | |
| 137 | |
| 138 void RemoteFrame::visibilityChanged(bool visible) { | |
| 139 if (client()) | |
| 140 client()->visibilityChanged(visible); | |
| 141 } | |
| 142 | |
| 143 void RemoteFrame::setView(RemoteFrameView* view) { | 134 void RemoteFrame::setView(RemoteFrameView* view) { |
| 144 // Oilpan: as RemoteFrameView performs no finalization actions, | 135 // Oilpan: as RemoteFrameView performs no finalization actions, |
| 145 // no explicit dispose() of it needed here. (cf. FrameView::dispose().) | 136 // no explicit dispose() of it needed here. (cf. FrameView::dispose().) |
| 146 m_view = view; | 137 m_view = view; |
| 147 | 138 |
| 148 // ... the RemoteDOMWindow will need to be informed of detachment, | 139 // ... the RemoteDOMWindow will need to be informed of detachment, |
| 149 // as otherwise it will keep a strong reference back to this RemoteFrame. | 140 // as otherwise it will keep a strong reference back to this RemoteFrame. |
| 150 // That combined with wrappers (owned and kept alive by RemoteFrame) keeping | 141 // That combined with wrappers (owned and kept alive by RemoteFrame) keeping |
| 151 // persistent strong references to RemoteDOMWindow will prevent the GCing | 142 // persistent strong references to RemoteDOMWindow will prevent the GCing |
| 152 // of all these objects. Break the cycle by notifying of detachment. | 143 // of all these objects. Break the cycle by notifying of detachment. |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 FrameVector childrenToDetach; | 183 FrameVector childrenToDetach; |
| 193 childrenToDetach.reserveCapacity(tree().childCount()); | 184 childrenToDetach.reserveCapacity(tree().childCount()); |
| 194 for (Frame* child = tree().firstChild(); child; | 185 for (Frame* child = tree().firstChild(); child; |
| 195 child = child->tree().nextSibling()) | 186 child = child->tree().nextSibling()) |
| 196 childrenToDetach.push_back(child); | 187 childrenToDetach.push_back(child); |
| 197 for (const auto& child : childrenToDetach) | 188 for (const auto& child : childrenToDetach) |
| 198 child->detach(FrameDetachType::Remove); | 189 child->detach(FrameDetachType::Remove); |
| 199 } | 190 } |
| 200 | 191 |
| 201 } // namespace blink | 192 } // namespace blink |
| OLD | NEW |