OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009, 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2009, 2012 Google Inc. All rights reserved. |
3 * Copyright (C) 2011 Apple Inc. All rights reserved. | 3 * Copyright (C) 2011 Apple Inc. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
7 * met: | 7 * met: |
8 * | 8 * |
9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 #include "wtf/text/WTFString.h" | 102 #include "wtf/text/WTFString.h" |
103 #include <v8.h> | 103 #include <v8.h> |
104 | 104 |
105 namespace blink { | 105 namespace blink { |
106 | 106 |
107 FrameLoaderClientImpl::FrameLoaderClientImpl(WebLocalFrameImpl* frame) | 107 FrameLoaderClientImpl::FrameLoaderClientImpl(WebLocalFrameImpl* frame) |
108 : m_webFrame(frame) | 108 : m_webFrame(frame) |
109 { | 109 { |
110 } | 110 } |
111 | 111 |
| 112 PassOwnPtrWillBeRawPtr<FrameLoaderClientImpl> FrameLoaderClientImpl::create(WebL
ocalFrameImpl* frame) |
| 113 { |
| 114 return adoptPtrWillBeNoop(new FrameLoaderClientImpl(frame)); |
| 115 } |
| 116 |
112 FrameLoaderClientImpl::~FrameLoaderClientImpl() | 117 FrameLoaderClientImpl::~FrameLoaderClientImpl() |
113 { | 118 { |
114 } | 119 } |
115 | 120 |
| 121 DEFINE_TRACE(FrameLoaderClientImpl) |
| 122 { |
| 123 visitor->trace(m_webFrame); |
| 124 FrameLoaderClient::trace(visitor); |
| 125 } |
| 126 |
116 void FrameLoaderClientImpl::didCreateNewDocument() | 127 void FrameLoaderClientImpl::didCreateNewDocument() |
117 { | 128 { |
118 if (m_webFrame->client()) | 129 if (m_webFrame->client()) |
119 m_webFrame->client()->didCreateNewDocument(m_webFrame); | 130 m_webFrame->client()->didCreateNewDocument(m_webFrame); |
120 } | 131 } |
121 | 132 |
122 void FrameLoaderClientImpl::dispatchDidClearWindowObjectInMainWorld() | 133 void FrameLoaderClientImpl::dispatchDidClearWindowObjectInMainWorld() |
123 { | 134 { |
124 if (m_webFrame->client()) { | 135 if (m_webFrame->client()) { |
125 m_webFrame->client()->didClearWindowObject(m_webFrame); | 136 m_webFrame->client()->didClearWindowObject(m_webFrame); |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
315 | 326 |
316 void FrameLoaderClientImpl::willBeDetached() | 327 void FrameLoaderClientImpl::willBeDetached() |
317 { | 328 { |
318 m_webFrame->willBeDetached(); | 329 m_webFrame->willBeDetached(); |
319 } | 330 } |
320 | 331 |
321 void FrameLoaderClientImpl::detached(FrameDetachType type) | 332 void FrameLoaderClientImpl::detached(FrameDetachType type) |
322 { | 333 { |
323 // Alert the client that the frame is being detached. This is the last | 334 // Alert the client that the frame is being detached. This is the last |
324 // chance we have to communicate with the client. | 335 // chance we have to communicate with the client. |
325 RefPtrWillBeRawPtr<WebLocalFrameImpl> protector(m_webFrame); | 336 RefPtrWillBeRawPtr<WebLocalFrameImpl> protector(m_webFrame.get()); |
326 | 337 |
327 WebFrameClient* client = m_webFrame->client(); | 338 WebFrameClient* client = m_webFrame->client(); |
328 if (!client) | 339 if (!client) |
329 return; | 340 return; |
330 | 341 |
331 m_webFrame->willDetachParent(); | 342 m_webFrame->willDetachParent(); |
332 | 343 |
333 // Signal that no further communication with WebFrameClient should take | 344 // Signal that no further communication with WebFrameClient should take |
334 // place at this point since we are no longer associated with the Page. | 345 // place at this point since we are no longer associated with the Page. |
335 m_webFrame->setClient(0); | 346 m_webFrame->setClient(0); |
(...skipping 637 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
973 | 984 |
974 void FrameLoaderClientImpl::suddenTerminationDisablerChanged(bool present, Sudde
nTerminationDisablerType type) | 985 void FrameLoaderClientImpl::suddenTerminationDisablerChanged(bool present, Sudde
nTerminationDisablerType type) |
975 { | 986 { |
976 if (m_webFrame->client()) { | 987 if (m_webFrame->client()) { |
977 m_webFrame->client()->suddenTerminationDisablerChanged( | 988 m_webFrame->client()->suddenTerminationDisablerChanged( |
978 present, static_cast<WebFrameClient::SuddenTerminationDisablerType>(
type)); | 989 present, static_cast<WebFrameClient::SuddenTerminationDisablerType>(
type)); |
979 } | 990 } |
980 } | 991 } |
981 | 992 |
982 } // namespace blink | 993 } // namespace blink |
OLD | NEW |