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

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

Issue 342103003: Support UseCounter in dedicated workers. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Support countDeprecation Created 6 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) 2008, 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2008, 2009 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 15 matching lines...) Expand all
26 26
27 #ifndef WorkerGlobalScope_h 27 #ifndef WorkerGlobalScope_h
28 #define WorkerGlobalScope_h 28 #define WorkerGlobalScope_h
29 29
30 #include "bindings/v8/ScriptWrappable.h" 30 #include "bindings/v8/ScriptWrappable.h"
31 #include "bindings/v8/WorkerScriptController.h" 31 #include "bindings/v8/WorkerScriptController.h"
32 #include "core/dom/ExecutionContext.h" 32 #include "core/dom/ExecutionContext.h"
33 #include "core/events/EventListener.h" 33 #include "core/events/EventListener.h"
34 #include "core/events/EventTarget.h" 34 #include "core/events/EventTarget.h"
35 #include "core/frame/DOMWindowBase64.h" 35 #include "core/frame/DOMWindowBase64.h"
36 #include "core/frame/UseCounter.h"
36 #include "core/frame/csp/ContentSecurityPolicy.h" 37 #include "core/frame/csp/ContentSecurityPolicy.h"
37 #include "core/workers/WorkerEventQueue.h" 38 #include "core/workers/WorkerEventQueue.h"
38 #include "platform/heap/Handle.h" 39 #include "platform/heap/Handle.h"
39 #include "platform/network/ContentSecurityPolicyParsers.h" 40 #include "platform/network/ContentSecurityPolicyParsers.h"
40 #include "wtf/Assertions.h" 41 #include "wtf/Assertions.h"
41 #include "wtf/HashMap.h" 42 #include "wtf/HashMap.h"
42 #include "wtf/OwnPtr.h" 43 #include "wtf/OwnPtr.h"
43 #include "wtf/PassRefPtr.h" 44 #include "wtf/PassRefPtr.h"
44 #include "wtf/RefCounted.h" 45 #include "wtf/RefCounted.h"
45 #include "wtf/RefPtr.h" 46 #include "wtf/RefPtr.h"
(...skipping 17 matching lines...) Expand all
63 public: 64 public:
64 virtual ~WorkerGlobalScope(); 65 virtual ~WorkerGlobalScope();
65 66
66 virtual bool isWorkerGlobalScope() const OVERRIDE FINAL { return true; } 67 virtual bool isWorkerGlobalScope() const OVERRIDE FINAL { return true; }
67 68
68 virtual ExecutionContext* executionContext() const OVERRIDE FINAL; 69 virtual ExecutionContext* executionContext() const OVERRIDE FINAL;
69 70
70 virtual bool isSharedWorkerGlobalScope() const { return false; } 71 virtual bool isSharedWorkerGlobalScope() const { return false; }
71 virtual bool isDedicatedWorkerGlobalScope() const { return false; } 72 virtual bool isDedicatedWorkerGlobalScope() const { return false; }
72 virtual bool isServiceWorkerGlobalScope() const { return false; } 73 virtual bool isServiceWorkerGlobalScope() const { return false; }
74 virtual void countFeature(UseCounter::Feature) const;
75 virtual void countDeprecation(UseCounter::Feature) const;
73 76
74 const KURL& url() const { return m_url; } 77 const KURL& url() const { return m_url; }
75 KURL completeURL(const String&) const; 78 KURL completeURL(const String&) const;
76 79
77 virtual String userAgent(const KURL&) const OVERRIDE FINAL; 80 virtual String userAgent(const KURL&) const OVERRIDE FINAL;
78 virtual void disableEval(const String& errorMessage) OVERRIDE FINAL; 81 virtual void disableEval(const String& errorMessage) OVERRIDE FINAL;
79 82
80 WorkerScriptController* script() { return m_script.get(); } 83 WorkerScriptController* script() { return m_script.get(); }
81 void clearScript() { m_script.clear(); } 84 void clearScript() { m_script.clear(); }
82 void clearInspector(); 85 void clearInspector();
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 180
178 double m_timeOrigin; 181 double m_timeOrigin;
179 TerminationObserver* m_terminationObserver; 182 TerminationObserver* m_terminationObserver;
180 }; 183 };
181 184
182 DEFINE_TYPE_CASTS(WorkerGlobalScope, ExecutionContext, context, context->isWorke rGlobalScope(), context.isWorkerGlobalScope()); 185 DEFINE_TYPE_CASTS(WorkerGlobalScope, ExecutionContext, context, context->isWorke rGlobalScope(), context.isWorkerGlobalScope());
183 186
184 } // namespace WebCore 187 } // namespace WebCore
185 188
186 #endif // WorkerGlobalScope_h 189 #endif // WorkerGlobalScope_h
OLDNEW
« no previous file with comments | « Source/core/workers/DedicatedWorkerGlobalScope.cpp ('k') | Source/core/workers/WorkerGlobalScope.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698