| Index: Source/core/loader/BeaconLoader.h
|
| diff --git a/Source/core/loader/BeaconLoader.h b/Source/core/loader/BeaconLoader.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..f3699b139ba4445a54663ac4c3e316627d3b1ccf
|
| --- /dev/null
|
| +++ b/Source/core/loader/BeaconLoader.h
|
| @@ -0,0 +1,43 @@
|
| +// Copyright 2014 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef BeaconLoader_h
|
| +#define BeaconLoader_h
|
| +
|
| +#include "core/loader/SimplexLoader.h"
|
| +#include "platform/heap/Handle.h"
|
| +#include "wtf/Noncopyable.h"
|
| +
|
| +namespace WTF {
|
| +class ArrayBufferView;
|
| +}
|
| +
|
| +namespace WebCore {
|
| +
|
| +class Blob;
|
| +class DOMFormData;
|
| +class KURL;
|
| +class LocalFrame;
|
| +
|
| +// Issue asynchronous beacon transmission loads independent of LocalFrame
|
| +// staying alive. SimplexLoader providing the service.
|
| +class BeaconLoader FINAL : public SimplexLoader {
|
| + WTF_MAKE_NONCOPYABLE(BeaconLoader);
|
| + WTF_MAKE_FAST_ALLOCATED;
|
| +public:
|
| + static void sendBeacon(LocalFrame*, const KURL&, const String&);
|
| + static void sendBeacon(LocalFrame*, const KURL&, PassRefPtr<WTF::ArrayBufferView>&);
|
| + static void sendBeacon(LocalFrame*, const KURL&, PassRefPtrWillBeRawPtr<Blob>&);
|
| + static void sendBeacon(LocalFrame*, const KURL&, PassRefPtrWillBeRawPtr<DOMFormData>&);
|
| +
|
| + virtual ~BeaconLoader() { }
|
| +
|
| +private:
|
| + static void prepareRequest(LocalFrame*, ResourceRequest&);
|
| + static void issueRequest(LocalFrame*, ResourceRequest&);
|
| +};
|
| +
|
| +} // namespace WebCore
|
| +
|
| +#endif // BeaconLoader_h
|
|
|