Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(399)

Side by Side Diff: Source/core/loader/BeaconLoader.h

Issue 232053005: Implement navigator.sendBeacon() (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Adjust unrelated test expectation Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef BeaconLoader_h
6 #define BeaconLoader_h
7
8 #include "core/loader/SimplexLoader.h"
9 #include "platform/heap/Handle.h"
10 #include "wtf/Noncopyable.h"
11
12 namespace WTF {
13 class ArrayBufferView;
14 }
15
16 namespace WebCore {
17
18 class Blob;
19 class DOMFormData;
20 class KURL;
21 class LocalFrame;
22
23 // Issue asynchronous beacon transmission loads independent of LocalFrame
24 // staying alive. SimplexLoader providing the service.
25 class BeaconLoader FINAL : public SimplexLoader {
26 WTF_MAKE_NONCOPYABLE(BeaconLoader);
27 WTF_MAKE_FAST_ALLOCATED;
28 public:
29 static void sendBeacon(LocalFrame*, const KURL&, const String&);
30 static void sendBeacon(LocalFrame*, const KURL&, PassRefPtr<WTF::ArrayBuffer View>&);
31 static void sendBeacon(LocalFrame*, const KURL&, PassRefPtrWillBeRawPtr<Blob >&);
32 static void sendBeacon(LocalFrame*, const KURL&, PassRefPtrWillBeRawPtr<DOMF ormData>&);
33
34 virtual ~BeaconLoader() { }
35
36 private:
37 static void prepareRequest(LocalFrame*, ResourceRequest&);
38 static void issueRequest(LocalFrame*, ResourceRequest&);
39 };
40
41 } // namespace WebCore
42
43 #endif // BeaconLoader_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698