| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef BeaconLoader_h | 5 #ifndef BeaconLoader_h |
| 6 #define BeaconLoader_h | 6 #define BeaconLoader_h |
| 7 | 7 |
| 8 #include "core/loader/PingLoader.h" | 8 #include "core/loader/PingLoader.h" |
| 9 #include "platform/heap/Handle.h" | 9 #include "platform/heap/Handle.h" |
| 10 #include "wtf/Noncopyable.h" | 10 #include "wtf/Noncopyable.h" |
| 11 | 11 |
| 12 namespace WTF { | 12 namespace WTF { |
| 13 class ArrayBufferView; | 13 class ArrayBufferView; |
| 14 } | 14 } |
| 15 | 15 |
| 16 namespace blink { | 16 namespace blink { |
| 17 | 17 |
| 18 class Blob; | 18 class Blob; |
| 19 class DOMFormData; | 19 class DOMFormData; |
| 20 class KURL; | 20 class KURL; |
| 21 class LocalFrame; | 21 class LocalFrame; |
| 22 | 22 |
| 23 // Issue asynchronous beacon transmission loads independent of LocalFrame | 23 // Issue asynchronous beacon transmission loads independent of LocalFrame |
| 24 // staying alive. PingLoader providing the service. | 24 // staying alive. PingLoader providing the service. |
| 25 class BeaconLoader FINAL : public PingLoader { | 25 class BeaconLoader final : public PingLoader { |
| 26 WTF_MAKE_NONCOPYABLE(BeaconLoader); | 26 WTF_MAKE_NONCOPYABLE(BeaconLoader); |
| 27 WTF_MAKE_FAST_ALLOCATED; | 27 WTF_MAKE_FAST_ALLOCATED; |
| 28 public: | 28 public: |
| 29 virtual ~BeaconLoader() { } | 29 virtual ~BeaconLoader() { } |
| 30 | 30 |
| 31 static bool sendBeacon(LocalFrame*, int, const KURL&, const String&, int&); | 31 static bool sendBeacon(LocalFrame*, int, const KURL&, const String&, int&); |
| 32 static bool sendBeacon(LocalFrame*, int, const KURL&, PassRefPtr<WTF::ArrayB
ufferView>&, int&); | 32 static bool sendBeacon(LocalFrame*, int, const KURL&, PassRefPtr<WTF::ArrayB
ufferView>&, int&); |
| 33 static bool sendBeacon(LocalFrame*, int, const KURL&, Blob*, int&); | 33 static bool sendBeacon(LocalFrame*, int, const KURL&, Blob*, int&); |
| 34 static bool sendBeacon(LocalFrame*, int, const KURL&, PassRefPtrWillBeRawPtr
<DOMFormData>&, int&); | 34 static bool sendBeacon(LocalFrame*, int, const KURL&, PassRefPtrWillBeRawPtr
<DOMFormData>&, int&); |
| 35 | 35 |
| 36 private: | 36 private: |
| 37 static void prepareRequest(LocalFrame*, ResourceRequest&); | 37 static void prepareRequest(LocalFrame*, ResourceRequest&); |
| 38 static void issueRequest(LocalFrame*, ResourceRequest&); | 38 static void issueRequest(LocalFrame*, ResourceRequest&); |
| 39 }; | 39 }; |
| 40 | 40 |
| 41 } // namespace blink | 41 } // namespace blink |
| 42 | 42 |
| 43 #endif // BeaconLoader_h | 43 #endif // BeaconLoader_h |
| OLD | NEW |