| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be found | 2 // Use of this source code is governed by a BSD-style license that can be found |
| 3 // in the LICENSE file. | 3 // in the LICENSE file. |
| 4 | 4 |
| 5 #include "web/RemoteFrameOwner.h" | 5 #include "web/RemoteFrameOwner.h" |
| 6 | 6 |
| 7 #include "core/frame/LocalFrame.h" | 7 #include "core/frame/LocalFrame.h" |
| 8 #include "public/web/WebFrameClient.h" | 8 #include "public/web/WebFrameClient.h" |
| 9 #include "web/WebLocalFrameImpl.h" | 9 #include "web/WebLocalFrameImpl.h" |
| 10 | 10 |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 // period of time when a frame owner won't have an associated content frame. | 51 // period of time when a frame owner won't have an associated content frame. |
| 52 // To prevent the refcount from going to zero, WebFrame::swap() must keep a | 52 // To prevent the refcount from going to zero, WebFrame::swap() must keep a |
| 53 // stack reference to the frame owner if it is a remote frame owner. | 53 // stack reference to the frame owner if it is a remote frame owner. |
| 54 ref(); | 54 ref(); |
| 55 #endif | 55 #endif |
| 56 m_frame = &frame; | 56 m_frame = &frame; |
| 57 } | 57 } |
| 58 | 58 |
| 59 void RemoteFrameOwner::clearContentFrame() | 59 void RemoteFrameOwner::clearContentFrame() |
| 60 { | 60 { |
| 61 ASSERT(m_frame->owner() == this); | 61 DCHECK_EQ(m_frame->owner(), this); |
| 62 m_frame = nullptr; | 62 m_frame = nullptr; |
| 63 #if !ENABLE(OILPAN) | 63 #if !ENABLE(OILPAN) |
| 64 // Balance the ref() in setContentFrame(). | 64 // Balance the ref() in setContentFrame(). |
| 65 deref(); | 65 deref(); |
| 66 #endif | 66 #endif |
| 67 } | 67 } |
| 68 | 68 |
| 69 void RemoteFrameOwner::dispatchLoad() | 69 void RemoteFrameOwner::dispatchLoad() |
| 70 { | 70 { |
| 71 WebLocalFrameImpl* webFrame = WebLocalFrameImpl::fromFrame(toLocalFrame(*m_f
rame)); | 71 WebLocalFrameImpl* webFrame = WebLocalFrameImpl::fromFrame(toLocalFrame(*m_f
rame)); |
| 72 webFrame->client()->dispatchLoad(); | 72 webFrame->client()->dispatchLoad(); |
| 73 } | 73 } |
| 74 | 74 |
| 75 } // namespace blink | 75 } // namespace blink |
| OLD | NEW |