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 namespace WebCore { | |
| 17 | |
| 18 class Blob; | |
| 19 class DOMFormData; | |
| 20 class ExceptionState; | |
| 21 class ExecutionContext; | |
| 22 class KURL; | |
| 23 | |
| 24 class NavigatorBeacon FINAL : public NoBaseWillBeGarbageCollectedFinalized<Navig atorBeacon>, public WillBeHeapSupplement<Navigator> { | |
|
abarth-chromium
2014/04/10 18:25:14
You shouldn't need to instantiate this object at a
| |
| 25 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(NavigatorBeacon); | |
| 26 public: | |
| 27 virtual ~NavigatorBeacon() { } | |
| 28 | |
| 29 static NavigatorBeacon& from(Navigator&); | |
|
abarth-chromium
2014/04/10 18:25:14
You should be able to drop this function too.
| |
| 30 | |
| 31 static bool sendBeacon(ExecutionContext*, Navigator&, const String&, const S tring&, ExceptionState&); | |
| 32 static bool sendBeacon(ExecutionContext*, Navigator&, const String&, PassRef Ptr<WTF::ArrayBufferView>, ExceptionState&); | |
| 33 static bool sendBeacon(ExecutionContext*, Navigator&, const String&, PassRef PtrWillBeRawPtr<Blob>, ExceptionState&); | |
| 34 static bool sendBeacon(ExecutionContext*, Navigator&, const String&, PassRef PtrWillBeRawPtr<DOMFormData>, ExceptionState&); | |
| 35 | |
| 36 void trace(Visitor*) { } | |
| 37 | |
| 38 private: | |
| 39 NavigatorBeacon() { } | |
| 40 static const char* supplementName(); | |
| 41 | |
| 42 static bool isAllowedAccess(ExecutionContext*, const KURL&, ExceptionState&) ; | |
| 43 }; | |
| 44 | |
| 45 } // namespace WebCore | |
| 46 | |
| 47 #endif // NavigatorBeacon_h | |
| OLD | NEW |