Chromium Code Reviews| OLD | NEW |
|---|---|
| (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 NavigatorBeacon_h | |
| 6 #define NavigatorBeacon_h | |
| 7 | |
| 8 #include "core/frame/Navigator.h" | |
| 9 #include "platform/Supplementable.h" | |
| 10 #include "platform/heap/Handle.h" | |
| 11 | |
| 12 namespace WTF { | |
| 13 class ArrayBufferView; | |
| 14 } | |
| 15 | |
| 16 #define BLINK_MAX | |
|
abarth-chromium
2014/05/08 13:15:25
???
sof
2014/05/08 20:47:07
Sorry, that shouldn't have made into this patch. R
| |
| 17 | |
| 18 namespace WebCore { | |
| 19 | |
| 20 class Blob; | |
| 21 class DOMFormData; | |
| 22 class ExceptionState; | |
| 23 class ExecutionContext; | |
| 24 class KURL; | |
| 25 | |
| 26 class NavigatorBeacon FINAL : public NoBaseWillBeGarbageCollectedFinalized<Navig atorBeacon>, public WillBeHeapSupplement<Navigator> { | |
|
abarth-chromium
2014/05/08 13:15:25
Are you use this class needs to be finalized?
sof
2014/05/08 20:47:07
No, nothing needs to be finalized from this class
| |
| 27 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(NavigatorBeacon); | |
| 28 public: | |
| 29 virtual ~NavigatorBeacon() { } | |
| 30 | |
| 31 static NavigatorBeacon& from(Navigator&); | |
| 32 | |
| 33 static bool sendBeacon(ExecutionContext*, Navigator&, const String&, const S tring&, ExceptionState&); | |
| 34 static bool sendBeacon(ExecutionContext*, Navigator&, const String&, PassRef Ptr<WTF::ArrayBufferView>, ExceptionState&); | |
| 35 static bool sendBeacon(ExecutionContext*, Navigator&, const String&, PassRef PtrWillBeRawPtr<Blob>, ExceptionState&); | |
| 36 static bool sendBeacon(ExecutionContext*, Navigator&, const String&, PassRef PtrWillBeRawPtr<DOMFormData>, ExceptionState&); | |
| 37 | |
| 38 void trace(Visitor*) { } | |
| 39 | |
| 40 private: | |
| 41 explicit NavigatorBeacon(Navigator&); | |
| 42 | |
| 43 static const char* supplementName(); | |
| 44 | |
| 45 bool sendBeacon(ExecutionContext*, const String&, const String&, ExceptionSt ate&); | |
| 46 bool sendBeacon(ExecutionContext*, const String&, PassRefPtr<WTF::ArrayBuffe rView>, ExceptionState&); | |
| 47 bool sendBeacon(ExecutionContext*, const String&, PassRefPtrWillBeRawPtr<Blo b>, ExceptionState&); | |
| 48 bool sendBeacon(ExecutionContext*, const String&, PassRefPtrWillBeRawPtr<DOM FormData>, ExceptionState&); | |
| 49 | |
| 50 bool isAllowedAccess(ExecutionContext*, const KURL&, ExceptionState&); | |
| 51 int maxAllowance() const; | |
| 52 void updateTransmittedBytes(int); | |
| 53 | |
| 54 int m_transmittedBytes; | |
| 55 Navigator& m_navigator; | |
| 56 }; | |
| 57 | |
| 58 } // namespace WebCore | |
| 59 | |
| 60 #endif // NavigatorBeacon_h | |
| OLD | NEW |