Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(37)

Side by Side Diff: Source/core/workers/SharedWorkerGlobalScope.h

Issue 17648006: Rename WorkerContext to WorkerGlobalScope (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on master Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 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
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 #ifndef SharedWorkerContext_h 31 #ifndef SharedWorkerGlobalScope_h
32 #define SharedWorkerContext_h 32 #define SharedWorkerGlobalScope_h
33 33
34 #include "core/page/ContentSecurityPolicy.h" 34 #include "core/page/ContentSecurityPolicy.h"
35 #include "core/workers/WorkerContext.h" 35 #include "core/workers/WorkerGlobalScope.h"
36 36
37 namespace WebCore { 37 namespace WebCore {
38 38
39 class MessageEvent; 39 class MessageEvent;
40 class SharedWorkerThread; 40 class SharedWorkerThread;
41 41
42 class SharedWorkerContext : public WorkerContext { 42 class SharedWorkerGlobalScope : public WorkerGlobalScope {
43 public: 43 public:
44 typedef WorkerContext Base; 44 typedef WorkerGlobalScope Base;
45 static PassRefPtr<SharedWorkerContext> create(const String& name, const KURL&, const String& userAgent, SharedWorkerThread*, const String& contentSecuri tyPolicy, ContentSecurityPolicy::HeaderType contentSecurityPolicyType); 45 static PassRefPtr<SharedWorkerGlobalScope> create(const String& name, co nst KURL&, const String& userAgent, SharedWorkerThread*, const String& contentSe curityPolicy, ContentSecurityPolicy::HeaderType contentSecurityPolicyType);
46 virtual ~SharedWorkerContext(); 46 virtual ~SharedWorkerGlobalScope();
47 47
48 virtual bool isSharedWorkerContext() const OVERRIDE { return true; } 48 virtual bool isSharedWorkerGlobalScope() const OVERRIDE { return true; }
49 49
50 // EventTarget 50 // EventTarget
51 virtual const AtomicString& interfaceName() const OVERRIDE; 51 virtual const AtomicString& interfaceName() const OVERRIDE;
52 52
53 // Setters/Getters for attributes in SharedWorkerContext.idl 53 // Setters/Getters for attributes in SharedWorkerGlobalScope.idl
54 DEFINE_ATTRIBUTE_EVENT_LISTENER(connect); 54 DEFINE_ATTRIBUTE_EVENT_LISTENER(connect);
55 String name() const { return m_name; } 55 String name() const { return m_name; }
56 56
57 SharedWorkerThread* thread(); 57 SharedWorkerThread* thread();
58 58
59 private: 59 private:
60 SharedWorkerContext(const String& name, const KURL&, const String& userA gent, SharedWorkerThread*); 60 SharedWorkerGlobalScope(const String& name, const KURL&, const String& u serAgent, SharedWorkerThread*);
61 virtual void logExceptionToConsole(const String& errorMessage, const Str ing& sourceURL, int lineNumber, PassRefPtr<ScriptCallStack>) OVERRIDE; 61 virtual void logExceptionToConsole(const String& errorMessage, const Str ing& sourceURL, int lineNumber, PassRefPtr<ScriptCallStack>) OVERRIDE;
62 62
63 String m_name; 63 String m_name;
64 }; 64 };
65 65
66 PassRefPtr<MessageEvent> createConnectEvent(PassRefPtr<MessagePort>); 66 PassRefPtr<MessageEvent> createConnectEvent(PassRefPtr<MessagePort>);
67 67
68 } // namespace WebCore 68 } // namespace WebCore
69 69
70 #endif // SharedWorkerContext_h 70 #endif // SharedWorkerGlobalScope_h
OLDNEW
« no previous file with comments | « Source/core/workers/SharedWorkerContext.idl ('k') | Source/core/workers/SharedWorkerGlobalScope.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698