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

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

Issue 2425663002: Add an error page for resources blocked via XSS Auditor. (Closed)
Patch Set: Test. Created 4 years 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 586 matching lines...) Expand 10 before | Expand all | Expand 10 after
597 bool shouldReplaceCurrentEntry) { 597 bool shouldReplaceCurrentEntry) {
598 if (!m_webFrame->client()) 598 if (!m_webFrame->client())
599 return; 599 return;
600 DCHECK(m_webFrame->frame()->document()); 600 DCHECK(m_webFrame->frame()->document());
601 Fullscreen::fullyExitFullscreen(*m_webFrame->frame()->document()); 601 Fullscreen::fullyExitFullscreen(*m_webFrame->frame()->document());
602 m_webFrame->client()->loadURLExternally( 602 m_webFrame->client()->loadURLExternally(
603 WrappedResourceRequest(request), static_cast<WebNavigationPolicy>(policy), 603 WrappedResourceRequest(request), static_cast<WebNavigationPolicy>(policy),
604 suggestedName, shouldReplaceCurrentEntry); 604 suggestedName, shouldReplaceCurrentEntry);
605 } 605 }
606 606
607 void FrameLoaderClientImpl::loadErrorPage(int reason) {
608 if (m_webFrame->client())
609 m_webFrame->client()->loadErrorPage(reason);
610 }
611
607 bool FrameLoaderClientImpl::navigateBackForward(int offset) const { 612 bool FrameLoaderClientImpl::navigateBackForward(int offset) const {
608 WebViewImpl* webview = m_webFrame->viewImpl(); 613 WebViewImpl* webview = m_webFrame->viewImpl();
609 if (!webview->client()) 614 if (!webview->client())
610 return false; 615 return false;
611 616
612 DCHECK(offset); 617 DCHECK(offset);
613 if (offset > webview->client()->historyForwardListCount()) 618 if (offset > webview->client()->historyForwardListCount())
614 return false; 619 return false;
615 if (offset < -webview->client()->historyBackListCount()) 620 if (offset < -webview->client()->historyBackListCount())
616 return false; 621 return false;
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after
990 WebDevToolsAgentImpl* FrameLoaderClientImpl::devToolsAgent() { 995 WebDevToolsAgentImpl* FrameLoaderClientImpl::devToolsAgent() {
991 return WebLocalFrameImpl::fromFrame(m_webFrame->frame()->localFrameRoot()) 996 return WebLocalFrameImpl::fromFrame(m_webFrame->frame()->localFrameRoot())
992 ->devToolsAgentImpl(); 997 ->devToolsAgentImpl();
993 } 998 }
994 999
995 KURL FrameLoaderClientImpl::overrideFlashEmbedWithHTML(const KURL& url) { 1000 KURL FrameLoaderClientImpl::overrideFlashEmbedWithHTML(const KURL& url) {
996 return m_webFrame->client()->overrideFlashEmbedWithHTML(WebURL(url)); 1001 return m_webFrame->client()->overrideFlashEmbedWithHTML(WebURL(url));
997 } 1002 }
998 1003
999 } // namespace blink 1004 } // 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