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

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: Words. Created 4 years, 1 month 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 367 matching lines...) Expand 10 before | Expand all | Expand 10 after
984 WebDevToolsAgentImpl* FrameLoaderClientImpl::devToolsAgent() { 989 WebDevToolsAgentImpl* FrameLoaderClientImpl::devToolsAgent() {
985 return WebLocalFrameImpl::fromFrame(m_webFrame->frame()->localFrameRoot()) 990 return WebLocalFrameImpl::fromFrame(m_webFrame->frame()->localFrameRoot())
986 ->devToolsAgentImpl(); 991 ->devToolsAgentImpl();
987 } 992 }
988 993
989 KURL FrameLoaderClientImpl::overrideFlashEmbedWithHTML(const KURL& url) { 994 KURL FrameLoaderClientImpl::overrideFlashEmbedWithHTML(const KURL& url) {
990 return m_webFrame->client()->overrideFlashEmbedWithHTML(WebURL(url)); 995 return m_webFrame->client()->overrideFlashEmbedWithHTML(WebURL(url));
991 } 996 }
992 997
993 } // namespace blink 998 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698