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

Side by Side Diff: third_party/WebKit/Source/modules/beacon/NavigatorBeacon.h

Issue 1846913009: HeapSupplements are now just Supplements. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
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 NavigatorBeacon_h 5 #ifndef NavigatorBeacon_h
6 #define NavigatorBeacon_h 6 #define NavigatorBeacon_h
7 7
8 #include "core/frame/LocalFrameLifecycleObserver.h" 8 #include "core/frame/LocalFrameLifecycleObserver.h"
9 #include "core/frame/Navigator.h" 9 #include "core/frame/Navigator.h"
10 #include "platform/Supplementable.h" 10 #include "platform/Supplementable.h"
11 #include "platform/heap/Handle.h" 11 #include "platform/heap/Handle.h"
12 12
13 namespace blink { 13 namespace blink {
14 14
15 class Blob; 15 class Blob;
16 class ExceptionState; 16 class ExceptionState;
17 class ExecutionContext; 17 class ExecutionContext;
18 class KURL; 18 class KURL;
19 class ArrayBufferViewOrBlobOrStringOrFormData; 19 class ArrayBufferViewOrBlobOrStringOrFormData;
20 20
21 class NavigatorBeacon final : public GarbageCollectedFinalized<NavigatorBeacon>, public LocalFrameLifecycleObserver, public HeapSupplement<Navigator> { 21 class NavigatorBeacon final : public GarbageCollectedFinalized<NavigatorBeacon>, public LocalFrameLifecycleObserver, public Supplement<Navigator> {
22 USING_GARBAGE_COLLECTED_MIXIN(NavigatorBeacon); 22 USING_GARBAGE_COLLECTED_MIXIN(NavigatorBeacon);
23 public: 23 public:
24 static NavigatorBeacon& from(Navigator&); 24 static NavigatorBeacon& from(Navigator&);
25 virtual ~NavigatorBeacon(); 25 virtual ~NavigatorBeacon();
26 26
27 static bool sendBeacon(ExecutionContext*, Navigator&, const String&, const A rrayBufferViewOrBlobOrStringOrFormData&, ExceptionState&); 27 static bool sendBeacon(ExecutionContext*, Navigator&, const String&, const A rrayBufferViewOrBlobOrStringOrFormData&, ExceptionState&);
28 28
29 DECLARE_VIRTUAL_TRACE(); 29 DECLARE_VIRTUAL_TRACE();
30 30
31 private: 31 private:
32 explicit NavigatorBeacon(Navigator&); 32 explicit NavigatorBeacon(Navigator&);
33 33
34 static const char* supplementName(); 34 static const char* supplementName();
35 35
36 bool canSendBeacon(ExecutionContext*, const KURL&, ExceptionState&); 36 bool canSendBeacon(ExecutionContext*, const KURL&, ExceptionState&);
37 int maxAllowance() const; 37 int maxAllowance() const;
38 bool beaconResult(ExecutionContext*, bool allowed, int sentBytes); 38 bool beaconResult(ExecutionContext*, bool allowed, int sentBytes);
39 39
40 int m_transmittedBytes; 40 int m_transmittedBytes;
41 }; 41 };
42 42
43 } // namespace blink 43 } // namespace blink
44 44
45 #endif // NavigatorBeacon_h 45 #endif // NavigatorBeacon_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698