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

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: kinuko 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) 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 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 const NavigationPolicyInfo& info) { 319 const NavigationPolicyInfo& info) {
320 return info.defaultPolicy; 320 return info.defaultPolicy;
321 } 321 }
322 322
323 // During a history navigation, we may choose to load new subframes from 323 // During a history navigation, we may choose to load new subframes from
324 // history as well. This returns such a history item if appropriate. 324 // history as well. This returns such a history item if appropriate.
325 virtual WebHistoryItem historyItemForNewChildFrame() { 325 virtual WebHistoryItem historyItemForNewChildFrame() {
326 return WebHistoryItem(); 326 return WebHistoryItem();
327 } 327 }
328 328
329 // Asks the embedder whether the frame is allowed to navigate the main frame
330 // to a data URL.
331 virtual bool allowContentInitiatedDataUrlNavigations(const WebURL&) {
332 return false;
333 }
334
329 // Navigational notifications ------------------------------------------ 335 // Navigational notifications ------------------------------------------
330 336
331 // These notifications bracket any loading that occurs in the WebFrame. 337 // These notifications bracket any loading that occurs in the WebFrame.
332 virtual void didStartLoading(bool toDifferentDocument) {} 338 virtual void didStartLoading(bool toDifferentDocument) {}
333 virtual void didStopLoading() {} 339 virtual void didStopLoading() {}
334 340
335 // Notification that some progress was made loading the current frame. 341 // Notification that some progress was made loading the current frame.
336 // loadProgress is a value between 0 (nothing loaded) and 1.0 (frame fully 342 // loadProgress is a value between 0 (nothing loaded) and 1.0 (frame fully
337 // loaded). 343 // loaded).
338 virtual void didChangeLoadProgress(double loadProgress) {} 344 virtual void didChangeLoadProgress(double loadProgress) {}
(...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after
756 // Overwrites the given URL to use an HTML5 embed if possible. 762 // Overwrites the given URL to use an HTML5 embed if possible.
757 // An empty URL is returned if the URL is not overriden. 763 // An empty URL is returned if the URL is not overriden.
758 virtual WebURL overrideFlashEmbedWithHTML(const WebURL& url) { 764 virtual WebURL overrideFlashEmbedWithHTML(const WebURL& url) {
759 return WebURL(); 765 return WebURL();
760 } 766 }
761 }; 767 };
762 768
763 } // namespace blink 769 } // namespace blink
764 770
765 #endif 771 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698