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

Unified Diff: Source/core/workers/WorkerGlobalScope.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/workers/WorkerContextProxy.cpp ('k') | Source/core/workers/WorkerGlobalScope.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/workers/WorkerGlobalScope.h
diff --git a/Source/core/workers/WorkerContext.h b/Source/core/workers/WorkerGlobalScope.h
similarity index 83%
rename from Source/core/workers/WorkerContext.h
rename to Source/core/workers/WorkerGlobalScope.h
index 3133e38365c740cbc453c86bbb5883163641f68c..af4ab87b393d8cad692f767391dbfe8cfc202c34 100644
--- a/Source/core/workers/WorkerContext.h
+++ b/Source/core/workers/WorkerGlobalScope.h
@@ -24,8 +24,8 @@
*
*/
-#ifndef WorkerContext_h
-#define WorkerContext_h
+#ifndef WorkerGlobalScope_h
+#define WorkerGlobalScope_h
#include "bindings/v8/ScriptWrappable.h"
#include "bindings/v8/WorkerScriptController.h"
@@ -35,13 +35,13 @@
#include "core/dom/ScriptExecutionContext.h"
#include "core/page/ContentSecurityPolicy.h"
#include "core/workers/WorkerEventQueue.h"
-#include <wtf/Assertions.h>
-#include <wtf/HashMap.h>
-#include <wtf/OwnPtr.h>
-#include <wtf/PassRefPtr.h>
-#include <wtf/RefCounted.h>
-#include <wtf/RefPtr.h>
-#include <wtf/text/AtomicStringHash.h>
+#include "wtf/Assertions.h"
+#include "wtf/HashMap.h"
+#include "wtf/OwnPtr.h"
+#include "wtf/PassRefPtr.h"
+#include "wtf/RefCounted.h"
+#include "wtf/RefPtr.h"
+#include "wtf/text/AtomicStringHash.h"
namespace WebCore {
@@ -53,16 +53,16 @@ namespace WebCore {
class WorkerNavigator;
class WorkerThread;
- class WorkerContext : public RefCounted<WorkerContext>, public ScriptWrappable, public ScriptExecutionContext, public EventTarget {
+ class WorkerGlobalScope : public RefCounted<WorkerGlobalScope>, public ScriptWrappable, public ScriptExecutionContext, public EventTarget {
public:
- virtual ~WorkerContext();
+ virtual ~WorkerGlobalScope();
- virtual bool isWorkerContext() const OVERRIDE { return true; }
+ virtual bool isWorkerGlobalScope() const OVERRIDE { return true; }
virtual ScriptExecutionContext* scriptExecutionContext() const OVERRIDE;
- virtual bool isSharedWorkerContext() const { return false; }
- virtual bool isDedicatedWorkerContext() const { return false; }
+ virtual bool isSharedWorkerGlobalScope() const { return false; }
+ virtual bool isDedicatedWorkerGlobalScope() const { return false; }
const KURL& url() const { return m_url; }
KURL completeURL(const String&) const;
@@ -80,7 +80,7 @@ namespace WebCore {
virtual void postTask(PassOwnPtr<Task>) OVERRIDE; // Executes the task on context's thread asynchronously.
// WorkerGlobalScope
- WorkerContext* self() { return this; }
+ WorkerGlobalScope* self() { return this; }
WorkerLocation* location() const;
void close();
@@ -103,13 +103,13 @@ namespace WebCore {
virtual bool isJSExecutionForbidden() const OVERRIDE;
WorkerInspectorController* workerInspectorController() { return m_workerInspectorController.get(); }
- // These methods are used for GC marking. See JSWorkerContext::visitChildrenVirtual(SlotVisitor&) in
- // JSWorkerContextCustom.cpp.
+ // These methods are used for GC marking. See JSWorkerGlobalScope::visitChildrenVirtual(SlotVisitor&) in
+ // JSWorkerGlobalScopeCustom.cpp.
WorkerNavigator* optionalNavigator() const { return m_navigator.get(); }
WorkerLocation* optionalLocation() const { return m_location.get(); }
- using RefCounted<WorkerContext>::ref;
- using RefCounted<WorkerContext>::deref;
+ using RefCounted<WorkerGlobalScope>::ref;
+ using RefCounted<WorkerGlobalScope>::deref;
bool isClosing() { return m_closing; }
@@ -117,12 +117,12 @@ namespace WebCore {
class Observer {
WTF_MAKE_NONCOPYABLE(Observer);
public:
- Observer(WorkerContext*);
+ Observer(WorkerGlobalScope*);
virtual ~Observer();
virtual void notifyStop() = 0;
void stopObserving();
private:
- WorkerContext* m_context;
+ WorkerGlobalScope* m_context;
};
friend class Observer;
void registerObserver(Observer*);
@@ -134,7 +134,7 @@ namespace WebCore {
double timeOrigin() const { return m_timeOrigin; }
protected:
- WorkerContext(const KURL&, const String& userAgent, WorkerThread*, PassRefPtr<SecurityOrigin> topOrigin, double timeOrigin);
+ WorkerGlobalScope(const KURL&, const String& userAgent, WorkerThread*, PassRefPtr<SecurityOrigin> topOrigin, double timeOrigin);
void applyContentSecurityPolicyFromString(const String& contentSecurityPolicy, ContentSecurityPolicy::HeaderType);
virtual void logExceptionToConsole(const String& errorMessage, const String& sourceURL, int lineNumber, PassRefPtr<ScriptCallStack>) OVERRIDE;
@@ -182,4 +182,4 @@ namespace WebCore {
} // namespace WebCore
-#endif // WorkerContext_h
+#endif // WorkerGlobalScope_h
« no previous file with comments | « Source/core/workers/WorkerContextProxy.cpp ('k') | Source/core/workers/WorkerGlobalScope.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698