| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2013 Google Inc. All rights reserved. | 3 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * | 8 * |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 28 */ | 28 */ |
| 29 | 29 |
| 30 #ifndef WorkerConsole_h | 30 #ifndef WorkerConsole_h |
| 31 #define WorkerConsole_h | 31 #define WorkerConsole_h |
| 32 | 32 |
| 33 #include "bindings/v8/ScriptWrappable.h" | 33 #include "bindings/v8/ScriptWrappable.h" |
| 34 #include "core/inspector/ConsoleAPITypes.h" | 34 #include "core/inspector/ConsoleAPITypes.h" |
| 35 #include "core/frame/ConsoleBase.h" | 35 #include "core/frame/ConsoleBase.h" |
| 36 #include "core/frame/ConsoleTypes.h" | 36 #include "core/frame/ConsoleTypes.h" |
| 37 #include "heap/Handle.h" |
| 37 #include "wtf/PassRefPtr.h" | 38 #include "wtf/PassRefPtr.h" |
| 38 #include "wtf/RefCounted.h" | 39 #include "wtf/RefCounted.h" |
| 39 #include "wtf/RefPtr.h" | 40 #include "wtf/RefPtr.h" |
| 40 #include "wtf/text/WTFString.h" | 41 #include "wtf/text/WTFString.h" |
| 41 | 42 |
| 42 namespace WebCore { | 43 namespace WebCore { |
| 43 | 44 |
| 44 class ScriptArguments; | 45 class ScriptArguments; |
| 45 | 46 |
| 46 class WorkerConsole FINAL : public RefCounted<WorkerConsole>, public ConsoleBase
, public ScriptWrappable { | 47 class WorkerConsole FINAL : public RefCountedWillBeRefCountedGarbageCollected<Wo
rkerConsole>, public ConsoleBase, public ScriptWrappable { |
| 47 public: | 48 public: |
| 48 using RefCounted<WorkerConsole>::ref; | 49 using RefCountedWillBeRefCountedGarbageCollected<WorkerConsole>::ref; |
| 49 using RefCounted<WorkerConsole>::deref; | 50 using RefCountedWillBeRefCountedGarbageCollected<WorkerConsole>::deref; |
| 50 | 51 |
| 51 static PassRefPtr<WorkerConsole> create(WorkerGlobalScope* scope) { return a
doptRef(new WorkerConsole(scope)); } | 52 static PassRefPtrWillBeRawPtr<WorkerConsole> create(WorkerGlobalScope* scope
) |
| 53 { |
| 54 return adoptRefWillBeRefCountedGarbageCollected(new WorkerConsole(scope)
); |
| 55 } |
| 52 virtual ~WorkerConsole(); | 56 virtual ~WorkerConsole(); |
| 53 | 57 |
| 58 void trace(Visitor*); |
| 59 |
| 54 protected: | 60 protected: |
| 55 virtual ExecutionContext* context() OVERRIDE; | 61 virtual ExecutionContext* context() OVERRIDE; |
| 56 virtual void reportMessageToClient(MessageLevel, const String& message, Pass
RefPtr<ScriptCallStack>) OVERRIDE; | 62 virtual void reportMessageToClient(MessageLevel, const String& message, Pass
RefPtr<ScriptCallStack>) OVERRIDE; |
| 57 | 63 |
| 58 private: | 64 private: |
| 59 explicit WorkerConsole(WorkerGlobalScope*); | 65 explicit WorkerConsole(WorkerGlobalScope*); |
| 60 | 66 |
| 61 virtual void refConsole() OVERRIDE { ref(); } | 67 virtual void refConsole() OVERRIDE { ref(); } |
| 62 virtual void derefConsole() OVERRIDE { deref(); } | 68 virtual void derefConsole() OVERRIDE { deref(); } |
| 63 | 69 |
| 64 WorkerGlobalScope* m_scope; | 70 RawPtrWillBeMember<WorkerGlobalScope> m_scope; |
| 65 }; | 71 }; |
| 66 | 72 |
| 67 } // namespace WebCore | 73 } // namespace WebCore |
| 68 | 74 |
| 69 #endif // WorkerConsole_h | 75 #endif // WorkerConsole_h |
| OLD | NEW |