| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 | 50 |
| 51 // Issue an asynchronous, one-directional request at some resources, ignoring | 51 // Issue an asynchronous, one-directional request at some resources, ignoring |
| 52 // any response. The request is made independent of any LocalFrame staying alive
, | 52 // any response. The request is made independent of any LocalFrame staying alive
, |
| 53 // and must only stay alive until the transmission has completed successfully | 53 // and must only stay alive until the transmission has completed successfully |
| 54 // (or not -- errors are not propagated back either.) Upon transmission, the | 54 // (or not -- errors are not propagated back either.) Upon transmission, the |
| 55 // the load is cancelled and the loader cancels itself. | 55 // the load is cancelled and the loader cancels itself. |
| 56 // | 56 // |
| 57 // The ping loader is used by audit pings, beacon transmissions and image loads | 57 // The ping loader is used by audit pings, beacon transmissions and image loads |
| 58 // during page unloading. | 58 // during page unloading. |
| 59 // | 59 // |
| 60 class CORE_EXPORT PingLoader : public RefCountedGarbageCollected<PingLoader>, pu
blic LocalFrameLifecycleObserver, private WebURLLoaderClient { | 60 class CORE_EXPORT PingLoader : public GarbageCollectedFinalized<PingLoader>, pub
lic LocalFrameLifecycleObserver, private WebURLLoaderClient { |
| 61 USING_GARBAGE_COLLECTED_MIXIN(PingLoader); | 61 USING_GARBAGE_COLLECTED_MIXIN(PingLoader); |
| 62 WTF_MAKE_NONCOPYABLE(PingLoader); | 62 WTF_MAKE_NONCOPYABLE(PingLoader); |
| 63 public: | 63 public: |
| 64 ~PingLoader() override; | 64 ~PingLoader() override; |
| 65 | 65 |
| 66 enum ViolationReportType { | 66 enum ViolationReportType { |
| 67 ContentSecurityPolicyViolationReport, | 67 ContentSecurityPolicyViolationReport, |
| 68 XSSAuditorViolationReport | 68 XSSAuditorViolationReport |
| 69 }; | 69 }; |
| 70 | 70 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 91 void didFail(WebURLLoader*, const WebURLError&) final; | 91 void didFail(WebURLLoader*, const WebURLError&) final; |
| 92 | 92 |
| 93 void timeout(Timer<PingLoader>*); | 93 void timeout(Timer<PingLoader>*); |
| 94 | 94 |
| 95 void didFailLoading(LocalFrame*); | 95 void didFailLoading(LocalFrame*); |
| 96 | 96 |
| 97 OwnPtr<WebURLLoader> m_loader; | 97 OwnPtr<WebURLLoader> m_loader; |
| 98 Timer<PingLoader> m_timeout; | 98 Timer<PingLoader> m_timeout; |
| 99 String m_url; | 99 String m_url; |
| 100 unsigned long m_identifier; | 100 unsigned long m_identifier; |
| 101 SelfKeepAlive<PingLoader> m_keepAlive; |
| 101 }; | 102 }; |
| 102 | 103 |
| 103 } // namespace blink | 104 } // namespace blink |
| 104 | 105 |
| 105 #endif // PingLoader_h | 106 #endif // PingLoader_h |
| OLD | NEW |