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

Side by Side Diff: third_party/WebKit/Source/core/loader/DocumentLoader.cpp

Issue 1446253002: PlzNavigate: inform the WebFrameClient that a form will be submitted (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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) 2006, 2007, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.
3 * Copyright (C) 2011 Google Inc. All rights reserved. 3 * Copyright (C) 2011 Google 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 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. 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 325 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 RefPtr<SecurityOrigin> redirectingOrigin = SecurityOrigin::create(redirectRe sponse.url()); 336 RefPtr<SecurityOrigin> redirectingOrigin = SecurityOrigin::create(redirectRe sponse.url());
337 if (!redirectingOrigin->canDisplay(url)) { 337 if (!redirectingOrigin->canDisplay(url)) {
338 FrameLoader::reportLocalLoadFailed(m_frame, url.string()); 338 FrameLoader::reportLocalLoadFailed(m_frame, url.string());
339 cancelMainResourceLoad(ResourceError::cancelledError(url)); 339 cancelMainResourceLoad(ResourceError::cancelledError(url));
340 return; 340 return;
341 } 341 }
342 342
343 timing().addRedirect(redirectResponse.url(), url); 343 timing().addRedirect(redirectResponse.url(), url);
344 appendRedirect(url); 344 appendRedirect(url);
345 frameLoader()->receivedMainResourceRedirect(m_request.url()); 345 frameLoader()->receivedMainResourceRedirect(m_request.url());
346 if (!frameLoader()->shouldContinueForNavigationPolicy(request, SubstituteDat a(), this, CheckContentSecurityPolicy, m_navigationType, NavigationPolicyCurrent Tab, replacesCurrentHistoryItem())) 346 if (!frameLoader()->shouldContinueForNavigationPolicy(request, SubstituteDat a(), this, CheckContentSecurityPolicy, m_navigationType, NavigationPolicyCurrent Tab, replacesCurrentHistoryItem(), nullptr))
347 cancelMainResourceLoad(ResourceError::cancelledError(url)); 347 cancelMainResourceLoad(ResourceError::cancelledError(url));
348 } 348 }
349 349
350 static bool canShowMIMEType(const String& mimeType, Page* page) 350 static bool canShowMIMEType(const String& mimeType, Page* page)
351 { 351 {
352 if (Platform::current()->mimeRegistry()->supportsMIMEType(mimeType) == WebMi meRegistry::IsSupported) 352 if (Platform::current()->mimeRegistry()->supportsMIMEType(mimeType) == WebMi meRegistry::IsSupported)
353 return true; 353 return true;
354 PluginData* pluginData = page->pluginData(); 354 PluginData* pluginData = page->pluginData();
355 return !mimeType.isEmpty() && pluginData && pluginData->supportsMimeType(mim eType); 355 return !mimeType.isEmpty() && pluginData && pluginData->supportsMimeType(mim eType);
356 } 356 }
(...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after
794 { 794 {
795 m_writer = createWriterFor(ownerDocument, init, mimeType(), m_writer ? m_wri ter->encoding() : emptyAtom, true, ForceSynchronousParsing); 795 m_writer = createWriterFor(ownerDocument, init, mimeType(), m_writer ? m_wri ter->encoding() : emptyAtom, true, ForceSynchronousParsing);
796 if (!source.isNull()) 796 if (!source.isNull())
797 m_writer->appendReplacingData(source); 797 m_writer->appendReplacingData(source);
798 endWriting(m_writer.get()); 798 endWriting(m_writer.get());
799 } 799 }
800 800
801 DEFINE_WEAK_IDENTIFIER_MAP(DocumentLoader); 801 DEFINE_WEAK_IDENTIFIER_MAP(DocumentLoader);
802 802
803 } // namespace blink 803 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698