OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 10 matching lines...) Expand all Loading... |
21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | 21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | 22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
29 */ | 29 */ |
30 | 30 |
31 #include "config.h" | 31 #ifndef EventTargetModulesNames_h |
32 #include "modules/donottrack/NavigatorDoNotTrack.h" | 32 #define EventTargetModulesNames_h |
33 | 33 |
34 #include "core/frame/LocalFrame.h" | 34 #include "EventTargetNames.h" |
35 #include "core/frame/Navigator.h" | |
36 #include "core/loader/FrameLoaderClient.h" | |
37 | 35 |
38 namespace WebCore { | 36 namespace WebCore { |
| 37 namespace EventTargetNames { |
39 | 38 |
40 NavigatorDoNotTrack::NavigatorDoNotTrack(LocalFrame* frame) | 39 #ifndef EVENT_TARGET_NAMES_HIDE_GLOBALS |
41 : DOMWindowProperty(frame) | |
42 { | |
43 } | |
44 | 40 |
45 NavigatorDoNotTrack::~NavigatorDoNotTrack() | 41 extern const WTF::AtomicString BatteryManager; |
46 { | 42 extern const WTF::AtomicString MediaKeySession; |
47 } | 43 extern const WTF::AtomicString FileWriter; |
| 44 extern const WTF::AtomicString IDBDatabase; |
| 45 extern const WTF::AtomicString IDBOpenDBRequest; |
| 46 extern const WTF::AtomicString IDBRequest; |
| 47 extern const WTF::AtomicString IDBTransaction; |
| 48 extern const WTF::AtomicString MediaSource; |
| 49 extern const WTF::AtomicString SourceBuffer; |
| 50 extern const WTF::AtomicString SourceBufferList; |
| 51 extern const WTF::AtomicString MediaStream; |
| 52 extern const WTF::AtomicString MediaStreamTrack; |
| 53 extern const WTF::AtomicString RTCDTMFSender; |
| 54 extern const WTF::AtomicString RTCDataChannel; |
| 55 extern const WTF::AtomicString RTCPeerConnection; |
| 56 extern const WTF::AtomicString Notification; |
| 57 extern const WTF::AtomicString ServiceWorker; |
| 58 extern const WTF::AtomicString ServiceWorkerGlobalScope; |
| 59 extern const WTF::AtomicString SpeechRecognition; |
| 60 extern const WTF::AtomicString SpeechSynthesisUtterance; |
| 61 extern const WTF::AtomicString MIDIAccess; |
| 62 extern const WTF::AtomicString MIDIInput; |
| 63 extern const WTF::AtomicString MIDIPort; |
| 64 extern const WTF::AtomicString WebSocket; |
| 65 extern const WTF::AtomicString AudioContext; |
| 66 extern const WTF::AtomicString AudioNode; |
48 | 67 |
49 const char* NavigatorDoNotTrack::supplementName() | 68 #endif // EVENT_TARGET_NAMES_HIDE_GLOBALS |
50 { | |
51 return "NavigatorDoNotTrack"; | |
52 } | |
53 | 69 |
54 NavigatorDoNotTrack& NavigatorDoNotTrack::from(Navigator& navigator) | 70 void initModules(); |
55 { | |
56 NavigatorDoNotTrack* supplement = static_cast<NavigatorDoNotTrack*>(WillBeHe
apSupplement<Navigator>::from(navigator, supplementName())); | |
57 if (!supplement) { | |
58 supplement = new NavigatorDoNotTrack(navigator.frame()); | |
59 provideTo(navigator, supplementName(), adoptPtrWillBeNoop(supplement)); | |
60 } | |
61 return *supplement; | |
62 } | |
63 | 71 |
64 String NavigatorDoNotTrack::doNotTrack(Navigator& navigator) | 72 } // EventTargetNames |
65 { | 73 } // WebCore |
66 return NavigatorDoNotTrack::from(navigator).doNotTrack(); | |
67 } | |
68 | 74 |
69 String NavigatorDoNotTrack::doNotTrack() | 75 #endif |
70 { | |
71 if (!frame() || !frame()->loader().client()) | |
72 return String(); | |
73 return frame()->loader().client()->doNotTrackValue(); | |
74 } | |
75 | |
76 } // namespace WebCore | |
OLD | NEW |