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 26 matching lines...) Expand all Loading... |
37 #include "heap/Handle.h" | 37 #include "heap/Handle.h" |
38 #include "wtf/PassRefPtr.h" | 38 #include "wtf/PassRefPtr.h" |
39 #include "wtf/RefCounted.h" | 39 #include "wtf/RefCounted.h" |
40 #include "wtf/RefPtr.h" | 40 #include "wtf/RefPtr.h" |
41 #include "wtf/text/WTFString.h" | 41 #include "wtf/text/WTFString.h" |
42 | 42 |
43 namespace WebCore { | 43 namespace WebCore { |
44 | 44 |
45 class ScriptArguments; | 45 class ScriptArguments; |
46 | 46 |
47 class WorkerConsole FINAL : public RefCountedWillBeRefCountedGarbageCollected<Wo
rkerConsole>, public ConsoleBase, public ScriptWrappable { | 47 class WorkerConsole FINAL : public ConsoleBase, public ScriptWrappable { |
48 public: | 48 public: |
49 using RefCountedWillBeRefCountedGarbageCollected<WorkerConsole>::ref; | |
50 using RefCountedWillBeRefCountedGarbageCollected<WorkerConsole>::deref; | |
51 | |
52 static PassRefPtrWillBeRawPtr<WorkerConsole> create(WorkerGlobalScope* scope
) | 49 static PassRefPtrWillBeRawPtr<WorkerConsole> create(WorkerGlobalScope* scope
) |
53 { | 50 { |
54 return adoptRefWillBeRefCountedGarbageCollected(new WorkerConsole(scope)
); | 51 return adoptRefWillBeNoop(new WorkerConsole(scope)); |
55 } | 52 } |
56 virtual ~WorkerConsole(); | 53 virtual ~WorkerConsole(); |
57 | 54 |
58 void trace(Visitor*); | 55 void trace(Visitor*); |
59 | 56 |
60 protected: | 57 protected: |
61 virtual ExecutionContext* context() OVERRIDE; | 58 virtual ExecutionContext* context() OVERRIDE; |
62 virtual void reportMessageToClient(MessageLevel, const String& message, Pass
RefPtr<ScriptCallStack>) OVERRIDE; | 59 virtual void reportMessageToClient(MessageLevel, const String& message, Pass
RefPtr<ScriptCallStack>) OVERRIDE; |
63 | 60 |
64 private: | 61 private: |
65 explicit WorkerConsole(WorkerGlobalScope*); | 62 explicit WorkerConsole(WorkerGlobalScope*); |
66 | 63 |
67 virtual void refConsole() OVERRIDE { ref(); } | |
68 virtual void derefConsole() OVERRIDE { deref(); } | |
69 | |
70 RawPtrWillBeMember<WorkerGlobalScope> m_scope; | 64 RawPtrWillBeMember<WorkerGlobalScope> m_scope; |
71 }; | 65 }; |
72 | 66 |
73 } // namespace WebCore | 67 } // namespace WebCore |
74 | 68 |
75 #endif // WorkerConsole_h | 69 #endif // WorkerConsole_h |
OLD | NEW |