Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(229)

Side by Side Diff: third_party/WebKit/Source/web/FrameLoaderClientImpl.cpp

Issue 1642283002: Deal with frame removal by content scripts (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Last nits Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 if (m_webFrame->client()) 180 if (m_webFrame->client())
181 m_webFrame->client()->didCreateDocumentElement(m_webFrame); 181 m_webFrame->client()->didCreateDocumentElement(m_webFrame);
182 182
183 if (m_webFrame->parent()) 183 if (m_webFrame->parent())
184 return; 184 return;
185 185
186 if (m_webFrame->viewImpl()) 186 if (m_webFrame->viewImpl())
187 m_webFrame->viewImpl()->mainFrameDocumentElementAvailable(); 187 m_webFrame->viewImpl()->mainFrameDocumentElementAvailable();
188 } 188 }
189 189
190 void FrameLoaderClientImpl::runScriptsAtDocumentElementAvailable()
191 {
192 if (m_webFrame->client())
193 m_webFrame->client()->runScriptsAtDocumentElementAvailable(m_webFrame);
194 // The callback might have deleted the frame, do not use |this|!
195 }
196
197 void FrameLoaderClientImpl::runScriptsAtDocumentReady()
198 {
199 if (m_webFrame->client())
200 m_webFrame->client()->runScriptsAtDocumentReady(m_webFrame);
201 // The callback might have deleted the frame, do not use |this|!
202 }
203
190 void FrameLoaderClientImpl::didCreateScriptContext(v8::Local<v8::Context> contex t, int extensionGroup, int worldId) 204 void FrameLoaderClientImpl::didCreateScriptContext(v8::Local<v8::Context> contex t, int extensionGroup, int worldId)
191 { 205 {
192 if (m_webFrame->client()) 206 if (m_webFrame->client())
193 m_webFrame->client()->didCreateScriptContext(m_webFrame, context, extens ionGroup, worldId); 207 m_webFrame->client()->didCreateScriptContext(m_webFrame, context, extens ionGroup, worldId);
194 } 208 }
195 209
196 void FrameLoaderClientImpl::willReleaseScriptContext(v8::Local<v8::Context> cont ext, int worldId) 210 void FrameLoaderClientImpl::willReleaseScriptContext(v8::Local<v8::Context> cont ext, int worldId)
197 { 211 {
198 if (m_webFrame->client()) 212 if (m_webFrame->client())
199 m_webFrame->client()->willReleaseScriptContext(m_webFrame, context, worl dId); 213 m_webFrame->client()->willReleaseScriptContext(m_webFrame, context, worl dId);
(...skipping 823 matching lines...) Expand 10 before | Expand all | Expand 10 after
1023 1037
1024 void FrameLoaderClientImpl::suddenTerminationDisablerChanged(bool present, Sudde nTerminationDisablerType type) 1038 void FrameLoaderClientImpl::suddenTerminationDisablerChanged(bool present, Sudde nTerminationDisablerType type)
1025 { 1039 {
1026 if (m_webFrame->client()) { 1040 if (m_webFrame->client()) {
1027 m_webFrame->client()->suddenTerminationDisablerChanged( 1041 m_webFrame->client()->suddenTerminationDisablerChanged(
1028 present, static_cast<WebFrameClient::SuddenTerminationDisablerType>( type)); 1042 present, static_cast<WebFrameClient::SuddenTerminationDisablerType>( type));
1029 } 1043 }
1030 } 1044 }
1031 1045
1032 } // namespace blink 1046 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/FrameLoaderClientImpl.h ('k') | third_party/WebKit/public/web/WebFrameClient.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698