| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2008 Apple 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 24 */ | 24 */ |
| 25 | 25 |
| 26 #ifndef WorkerNavigator_h | 26 #ifndef WorkerNavigator_h |
| 27 #define WorkerNavigator_h | 27 #define WorkerNavigator_h |
| 28 | 28 |
| 29 #include "bindings/v8/ScriptWrappable.h" | 29 #include "bindings/v8/ScriptWrappable.h" |
| 30 #include "core/frame/NavigatorBase.h" | 30 #include "core/frame/NavigatorBase.h" |
| 31 #include "heap/Handle.h" |
| 31 #include "platform/Supplementable.h" | 32 #include "platform/Supplementable.h" |
| 32 #include "wtf/PassRefPtr.h" | 33 #include "wtf/PassRefPtr.h" |
| 33 #include "wtf/RefCounted.h" | 34 #include "wtf/RefCounted.h" |
| 34 #include "wtf/text/WTFString.h" | 35 #include "wtf/text/WTFString.h" |
| 35 | 36 |
| 36 namespace WebCore { | 37 namespace WebCore { |
| 37 | 38 |
| 38 class WorkerNavigator FINAL : public RefCounted<WorkerNavigator>, public ScriptW
rappable, public NavigatorBase, public Supplementable<WorkerNavigator> { | 39 class WorkerNavigator FINAL : public RefCountedWillBeGarbageCollectedFinalized<W
orkerNavigator>, public ScriptWrappable, public NavigatorBase, public WillBeHeap
Supplementable<WorkerNavigator> { |
| 39 public: | 40 public: |
| 40 static PassRefPtr<WorkerNavigator> create(const String& userAgent) { return
adoptRef(new WorkerNavigator(userAgent)); } | 41 static PassRefPtrWillBeRawPtr<WorkerNavigator> create(const String& userAgen
t) |
| 42 { |
| 43 return adoptRefWillBeNoop(new WorkerNavigator(userAgent)); |
| 44 } |
| 41 virtual ~WorkerNavigator(); | 45 virtual ~WorkerNavigator(); |
| 42 | 46 |
| 43 virtual String userAgent() const OVERRIDE; | 47 virtual String userAgent() const OVERRIDE; |
| 44 | 48 |
| 49 void trace(Visitor*); |
| 50 |
| 45 private: | 51 private: |
| 46 explicit WorkerNavigator(const String&); | 52 explicit WorkerNavigator(const String&); |
| 47 | 53 |
| 48 String m_userAgent; | 54 String m_userAgent; |
| 49 }; | 55 }; |
| 50 | 56 |
| 51 } // namespace WebCore | 57 } // namespace WebCore |
| 52 | 58 |
| 53 #endif // WorkerNavigator_h | 59 #endif // WorkerNavigator_h |
| OLD | NEW |