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

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

Issue 2702503002: Block renderer-initiated main frame navigations to data URLs (Closed)
Patch Set: nasko comments Created 3 years, 8 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 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 void LocalFrameClientImpl::didChangeScrollOffset() { 217 void LocalFrameClientImpl::didChangeScrollOffset() {
218 if (m_webFrame->client()) 218 if (m_webFrame->client())
219 m_webFrame->client()->didChangeScrollOffset(m_webFrame); 219 m_webFrame->client()->didChangeScrollOffset(m_webFrame);
220 } 220 }
221 221
222 void LocalFrameClientImpl::didUpdateCurrentHistoryItem() { 222 void LocalFrameClientImpl::didUpdateCurrentHistoryItem() {
223 if (m_webFrame->client()) 223 if (m_webFrame->client())
224 m_webFrame->client()->didUpdateCurrentHistoryItem(); 224 m_webFrame->client()->didUpdateCurrentHistoryItem();
225 } 225 }
226 226
227 bool LocalFrameClientImpl::allowContentInitiatedDataUrlNavigations(
228 const KURL& url) {
229 if (RuntimeEnabledFeatures::allowContentInitiatedDataUrlNavigationsEnabled())
230 return true;
231 if (m_webFrame->client())
232 return m_webFrame->client()->allowContentInitiatedDataUrlNavigations(url);
233 return false;
234 }
235
227 bool LocalFrameClientImpl::hasWebView() const { 236 bool LocalFrameClientImpl::hasWebView() const {
228 return m_webFrame->viewImpl(); 237 return m_webFrame->viewImpl();
229 } 238 }
230 239
231 bool LocalFrameClientImpl::inShadowTree() const { 240 bool LocalFrameClientImpl::inShadowTree() const {
232 return m_webFrame->inShadowTree(); 241 return m_webFrame->inShadowTree();
233 } 242 }
234 243
235 Frame* LocalFrameClientImpl::opener() const { 244 Frame* LocalFrameClientImpl::opener() const {
236 return toCoreFrame(m_webFrame->opener()); 245 return toCoreFrame(m_webFrame->opener());
(...skipping 729 matching lines...) Expand 10 before | Expand all | Expand 10 after
966 void LocalFrameClientImpl::abortClientNavigation() { 975 void LocalFrameClientImpl::abortClientNavigation() {
967 if (m_webFrame->client()) 976 if (m_webFrame->client())
968 m_webFrame->client()->abortClientNavigation(); 977 m_webFrame->client()->abortClientNavigation();
969 } 978 }
970 979
971 TextCheckerClient& LocalFrameClientImpl::textCheckerClient() const { 980 TextCheckerClient& LocalFrameClientImpl::textCheckerClient() const {
972 return m_webFrame->textCheckerClient(); 981 return m_webFrame->textCheckerClient();
973 } 982 }
974 983
975 } // namespace blink 984 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698