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 2007 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2018 } | 2018 } |
| 2019 | 2019 |
| 2020 bool WebLocalFrameImpl::isLoading() const { | 2020 bool WebLocalFrameImpl::isLoading() const { |
| 2021 if (!frame() || !frame()->document()) | 2021 if (!frame() || !frame()->document()) |
| 2022 return false; | 2022 return false; |
| 2023 return frame()->loader().stateMachine()->isDisplayingInitialEmptyDocument() || | 2023 return frame()->loader().stateMachine()->isDisplayingInitialEmptyDocument() || |
| 2024 frame()->loader().provisionalDocumentLoader() || | 2024 frame()->loader().provisionalDocumentLoader() || |
| 2025 !frame()->document()->loadEventFinished(); | 2025 !frame()->document()->loadEventFinished(); |
| 2026 } | 2026 } |
| 2027 | 2027 |
| 2028 bool WebLocalFrameImpl::isDetached() const { | |
| 2029 if (!frame() || !frame()->client()) | |
|
esprehn
2016/10/11 22:45:52
I'd prefer if the ->client() check was in core Fra
| |
| 2030 return true; | |
| 2031 return frame()->isDetached(); | |
| 2032 } | |
| 2033 | |
| 2028 bool WebLocalFrameImpl::isNavigationScheduledWithin( | 2034 bool WebLocalFrameImpl::isNavigationScheduledWithin( |
| 2029 double intervalInSeconds) const { | 2035 double intervalInSeconds) const { |
| 2030 return frame() && | 2036 return frame() && |
| 2031 frame()->navigationScheduler().isNavigationScheduledWithin( | 2037 frame()->navigationScheduler().isNavigationScheduledWithin( |
| 2032 intervalInSeconds); | 2038 intervalInSeconds); |
| 2033 } | 2039 } |
| 2034 | 2040 |
| 2035 void WebLocalFrameImpl::setCommittedFirstRealLoad() { | 2041 void WebLocalFrameImpl::setCommittedFirstRealLoad() { |
| 2036 DCHECK(frame()); | 2042 DCHECK(frame()); |
| 2037 ensureFrameLoaderHasCommitted(frame()->loader()); | 2043 ensureFrameLoaderHasCommitted(frame()->loader()); |
| (...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2340 feature = UseCounter::ChromeLoadTimesNpnNegotiatedProtocol; | 2346 feature = UseCounter::ChromeLoadTimesNpnNegotiatedProtocol; |
| 2341 } else if (metric == "wasAlternateProtocolAvailable") { | 2347 } else if (metric == "wasAlternateProtocolAvailable") { |
| 2342 feature = UseCounter::ChromeLoadTimesWasAlternateProtocolAvailable; | 2348 feature = UseCounter::ChromeLoadTimesWasAlternateProtocolAvailable; |
| 2343 } else if (metric == "connectionInfo") { | 2349 } else if (metric == "connectionInfo") { |
| 2344 feature = UseCounter::ChromeLoadTimesConnectionInfo; | 2350 feature = UseCounter::ChromeLoadTimesConnectionInfo; |
| 2345 } | 2351 } |
| 2346 UseCounter::count(frame(), feature); | 2352 UseCounter::count(frame(), feature); |
| 2347 } | 2353 } |
| 2348 | 2354 |
| 2349 } // namespace blink | 2355 } // namespace blink |
| OLD | NEW |