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

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

Issue 2439903003: PlzNavigate: Allow frames to fallback to alternative content. (Closed)
Patch Set: 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 Google Inc. All rights reserved. 2 * Copyright (C) 2009 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 2039 matching lines...) Expand 10 before | Expand all | Expand 10 after
2050 frameRequest.setReplacesCurrentItem(replace); 2050 frameRequest.setReplacesCurrentItem(replace);
2051 if (isClientRedirect) 2051 if (isClientRedirect)
2052 frameRequest.setClientRedirect(ClientRedirectPolicy::ClientRedirect); 2052 frameRequest.setClientRedirect(ClientRedirectPolicy::ClientRedirect);
2053 2053
2054 HistoryItem* historyItem = item; 2054 HistoryItem* historyItem = item;
2055 frame()->loader().load( 2055 frame()->loader().load(
2056 frameRequest, static_cast<FrameLoadType>(webFrameLoadType), historyItem, 2056 frameRequest, static_cast<FrameLoadType>(webFrameLoadType), historyItem,
2057 static_cast<HistoryLoadType>(webHistoryLoadType)); 2057 static_cast<HistoryLoadType>(webHistoryLoadType));
2058 } 2058 }
2059 2059
2060 void WebLocalFrameImpl::didFailNavigation() {
2061 DCHECK(frame());
2062 if (frame()->owner())
arthursonzogni 2016/10/21 15:59:31 I don't know if I can assume that frame()->owner()
2063 frame()->owner()->renderFallbackContent();
2064 }
2065
2060 bool WebLocalFrameImpl::isLoading() const { 2066 bool WebLocalFrameImpl::isLoading() const {
2061 if (!frame() || !frame()->document()) 2067 if (!frame() || !frame()->document())
2062 return false; 2068 return false;
2063 return frame()->loader().stateMachine()->isDisplayingInitialEmptyDocument() || 2069 return frame()->loader().stateMachine()->isDisplayingInitialEmptyDocument() ||
2064 frame()->loader().provisionalDocumentLoader() || 2070 frame()->loader().provisionalDocumentLoader() ||
2065 !frame()->document()->loadEventFinished(); 2071 !frame()->document()->loadEventFinished();
2066 } 2072 }
2067 2073
2068 bool WebLocalFrameImpl:: 2074 bool WebLocalFrameImpl::
2069 isFrameDetachedForSpecialOneOffStopTheCrashingHackBug561873() const { 2075 isFrameDetachedForSpecialOneOffStopTheCrashingHackBug561873() const {
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after
2385 feature = UseCounter::ChromeLoadTimesNpnNegotiatedProtocol; 2391 feature = UseCounter::ChromeLoadTimesNpnNegotiatedProtocol;
2386 } else if (metric == "wasAlternateProtocolAvailable") { 2392 } else if (metric == "wasAlternateProtocolAvailable") {
2387 feature = UseCounter::ChromeLoadTimesWasAlternateProtocolAvailable; 2393 feature = UseCounter::ChromeLoadTimesWasAlternateProtocolAvailable;
2388 } else if (metric == "connectionInfo") { 2394 } else if (metric == "connectionInfo") {
2389 feature = UseCounter::ChromeLoadTimesConnectionInfo; 2395 feature = UseCounter::ChromeLoadTimesConnectionInfo;
2390 } 2396 }
2391 UseCounter::count(frame(), feature); 2397 UseCounter::count(frame(), feature);
2392 } 2398 }
2393 2399
2394 } // namespace blink 2400 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698