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

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: Fix Android PDF tests where PDFs should be downloaded 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 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 void LocalFrameClientImpl::DidChangeScrollOffset() { 224 void LocalFrameClientImpl::DidChangeScrollOffset() {
225 if (web_frame_->Client()) 225 if (web_frame_->Client())
226 web_frame_->Client()->DidChangeScrollOffset(web_frame_); 226 web_frame_->Client()->DidChangeScrollOffset(web_frame_);
227 } 227 }
228 228
229 void LocalFrameClientImpl::DidUpdateCurrentHistoryItem() { 229 void LocalFrameClientImpl::DidUpdateCurrentHistoryItem() {
230 if (web_frame_->Client()) 230 if (web_frame_->Client())
231 web_frame_->Client()->DidUpdateCurrentHistoryItem(); 231 web_frame_->Client()->DidUpdateCurrentHistoryItem();
232 } 232 }
233 233
234 bool LocalFrameClientImpl::AllowContentInitiatedDataUrlNavigations(
235 const KURL& url) {
236 if (RuntimeEnabledFeatures::allowContentInitiatedDataUrlNavigationsEnabled())
237 return true;
238 if (web_frame_->Client())
239 return web_frame_->Client()->AllowContentInitiatedDataUrlNavigations(url);
240 return false;
241 }
242
234 bool LocalFrameClientImpl::HasWebView() const { 243 bool LocalFrameClientImpl::HasWebView() const {
235 return web_frame_->ViewImpl(); 244 return web_frame_->ViewImpl();
236 } 245 }
237 246
238 bool LocalFrameClientImpl::InShadowTree() const { 247 bool LocalFrameClientImpl::InShadowTree() const {
239 return web_frame_->InShadowTree(); 248 return web_frame_->InShadowTree();
240 } 249 }
241 250
242 Frame* LocalFrameClientImpl::Opener() const { 251 Frame* LocalFrameClientImpl::Opener() const {
243 return ToCoreFrame(web_frame_->Opener()); 252 return ToCoreFrame(web_frame_->Opener());
(...skipping 744 matching lines...) Expand 10 before | Expand all | Expand 10 after
988 void LocalFrameClientImpl::AbortClientNavigation() { 997 void LocalFrameClientImpl::AbortClientNavigation() {
989 if (web_frame_->Client()) 998 if (web_frame_->Client())
990 web_frame_->Client()->AbortClientNavigation(); 999 web_frame_->Client()->AbortClientNavigation();
991 } 1000 }
992 1001
993 TextCheckerClient& LocalFrameClientImpl::GetTextCheckerClient() const { 1002 TextCheckerClient& LocalFrameClientImpl::GetTextCheckerClient() const {
994 return web_frame_->GetTextCheckerClient(); 1003 return web_frame_->GetTextCheckerClient();
995 } 1004 }
996 1005
997 } // namespace blink 1006 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/LocalFrameClientImpl.h ('k') | third_party/WebKit/public/web/WebFrameClient.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698