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

Side by Side Diff: third_party/WebKit/public/web/WebFrameClient.h

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
« no previous file with comments | « third_party/WebKit/Source/web/LocalFrameClientImpl.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 const NavigationPolicyInfo& info) { 323 const NavigationPolicyInfo& info) {
324 return info.default_policy; 324 return info.default_policy;
325 } 325 }
326 326
327 // During a history navigation, we may choose to load new subframes from 327 // During a history navigation, we may choose to load new subframes from
328 // history as well. This returns such a history item if appropriate. 328 // history as well. This returns such a history item if appropriate.
329 virtual WebHistoryItem HistoryItemForNewChildFrame() { 329 virtual WebHistoryItem HistoryItemForNewChildFrame() {
330 return WebHistoryItem(); 330 return WebHistoryItem();
331 } 331 }
332 332
333 // Asks the embedder whether the frame is allowed to navigate the main frame
334 // to a data URL.
335 // TODO(crbug.com/713259): Move renderer side checks to
336 // RenderFrameImpl::DecidePolicyForNavigation().
337 virtual bool AllowContentInitiatedDataUrlNavigations(const WebURL&) {
338 return false;
339 }
340
333 // Navigational notifications ------------------------------------------ 341 // Navigational notifications ------------------------------------------
334 342
335 // These notifications bracket any loading that occurs in the WebFrame. 343 // These notifications bracket any loading that occurs in the WebFrame.
336 virtual void DidStartLoading(bool to_different_document) {} 344 virtual void DidStartLoading(bool to_different_document) {}
337 virtual void DidStopLoading() {} 345 virtual void DidStopLoading() {}
338 346
339 // Notification that some progress was made loading the current frame. 347 // Notification that some progress was made loading the current frame.
340 // loadProgress is a value between 0 (nothing loaded) and 1.0 (frame fully 348 // loadProgress is a value between 0 (nothing loaded) and 1.0 (frame fully
341 // loaded). 349 // loaded).
342 virtual void DidChangeLoadProgress(double load_progress) {} 350 virtual void DidChangeLoadProgress(double load_progress) {}
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after
759 // Overwrites the given URL to use an HTML5 embed if possible. 767 // Overwrites the given URL to use an HTML5 embed if possible.
760 // An empty URL is returned if the URL is not overriden. 768 // An empty URL is returned if the URL is not overriden.
761 virtual WebURL OverrideFlashEmbedWithHTML(const WebURL& url) { 769 virtual WebURL OverrideFlashEmbedWithHTML(const WebURL& url) {
762 return WebURL(); 770 return WebURL();
763 } 771 }
764 }; 772 };
765 773
766 } // namespace blink 774 } // namespace blink
767 775
768 #endif 776 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/LocalFrameClientImpl.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698