Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 2041 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2052 frameRequest.setReplacesCurrentItem(replace); | 2052 frameRequest.setReplacesCurrentItem(replace); |
| 2053 if (isClientRedirect) | 2053 if (isClientRedirect) |
| 2054 frameRequest.setClientRedirect(ClientRedirectPolicy::ClientRedirect); | 2054 frameRequest.setClientRedirect(ClientRedirectPolicy::ClientRedirect); |
| 2055 | 2055 |
| 2056 HistoryItem* historyItem = item; | 2056 HistoryItem* historyItem = item; |
| 2057 frame()->loader().load( | 2057 frame()->loader().load( |
| 2058 frameRequest, static_cast<FrameLoadType>(webFrameLoadType), historyItem, | 2058 frameRequest, static_cast<FrameLoadType>(webFrameLoadType), historyItem, |
| 2059 static_cast<HistoryLoadType>(webHistoryLoadType)); | 2059 static_cast<HistoryLoadType>(webHistoryLoadType)); |
| 2060 } | 2060 } |
| 2061 | 2061 |
| 2062 bool WebLocalFrameImpl::canRenderFallbackContent() const { | |
| 2063 DCHECK(frame()); | |
| 2064 return frame()->owner() && frame()->owner()->canRenderFallbackContent(); | |
| 2065 } | |
| 2066 | |
| 2067 void WebLocalFrameImpl::loadFailed() { | |
| 2068 DCHECK(frame()); | |
| 2069 if (frame()->owner()) | |
| 2070 frame()->owner()->renderFallbackContent(); | |
|
Nate Chapin
2016/10/27 16:44:02
Sorry, I was suggesting, instead of calling render
| |
| 2071 | |
| 2072 stopLoading(); | |
| 2073 } | |
| 2074 | |
| 2062 bool WebLocalFrameImpl::isLoading() const { | 2075 bool WebLocalFrameImpl::isLoading() const { |
| 2063 if (!frame() || !frame()->document()) | 2076 if (!frame() || !frame()->document()) |
| 2064 return false; | 2077 return false; |
| 2065 return frame()->loader().stateMachine()->isDisplayingInitialEmptyDocument() || | 2078 return frame()->loader().stateMachine()->isDisplayingInitialEmptyDocument() || |
| 2066 frame()->loader().provisionalDocumentLoader() || | 2079 frame()->loader().provisionalDocumentLoader() || |
| 2067 !frame()->document()->loadEventFinished(); | 2080 !frame()->document()->loadEventFinished(); |
| 2068 } | 2081 } |
| 2069 | 2082 |
| 2070 bool WebLocalFrameImpl:: | 2083 bool WebLocalFrameImpl:: |
| 2071 isFrameDetachedForSpecialOneOffStopTheCrashingHackBug561873() const { | 2084 isFrameDetachedForSpecialOneOffStopTheCrashingHackBug561873() const { |
| (...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2392 feature = UseCounter::ChromeLoadTimesNpnNegotiatedProtocol; | 2405 feature = UseCounter::ChromeLoadTimesNpnNegotiatedProtocol; |
| 2393 } else if (metric == "wasAlternateProtocolAvailable") { | 2406 } else if (metric == "wasAlternateProtocolAvailable") { |
| 2394 feature = UseCounter::ChromeLoadTimesWasAlternateProtocolAvailable; | 2407 feature = UseCounter::ChromeLoadTimesWasAlternateProtocolAvailable; |
| 2395 } else if (metric == "connectionInfo") { | 2408 } else if (metric == "connectionInfo") { |
| 2396 feature = UseCounter::ChromeLoadTimesConnectionInfo; | 2409 feature = UseCounter::ChromeLoadTimesConnectionInfo; |
| 2397 } | 2410 } |
| 2398 UseCounter::count(frame(), feature); | 2411 UseCounter::count(frame(), feature); |
| 2399 } | 2412 } |
| 2400 | 2413 |
| 2401 } // namespace blink | 2414 } // namespace blink |
| OLD | NEW |