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

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

Issue 631133003: Replace FINAL and OVERRIDE with their C++11 counterparts in Source/core/workers (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 2 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
« no previous file with comments | « Source/core/workers/WorkerEventQueue.h ('k') | Source/core/workers/WorkerInspectorProxy.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 class WorkerNavigator; 59 class WorkerNavigator;
60 class WorkerThread; 60 class WorkerThread;
61 61
62 class WorkerGlobalScope : public RefCountedWillBeGarbageCollectedFinalized<Worke rGlobalScope>, public SecurityContext, public ExecutionContext, public WillBeHea pSupplementable<WorkerGlobalScope>, public EventTargetWithInlineData, public DOM WindowBase64 { 62 class WorkerGlobalScope : public RefCountedWillBeGarbageCollectedFinalized<Worke rGlobalScope>, public SecurityContext, public ExecutionContext, public WillBeHea pSupplementable<WorkerGlobalScope>, public EventTargetWithInlineData, public DOM WindowBase64 {
63 DEFINE_WRAPPERTYPEINFO(); 63 DEFINE_WRAPPERTYPEINFO();
64 REFCOUNTED_EVENT_TARGET(WorkerGlobalScope); 64 REFCOUNTED_EVENT_TARGET(WorkerGlobalScope);
65 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(WorkerGlobalScope); 65 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(WorkerGlobalScope);
66 public: 66 public:
67 virtual ~WorkerGlobalScope(); 67 virtual ~WorkerGlobalScope();
68 68
69 virtual bool isWorkerGlobalScope() const OVERRIDE FINAL { return true; } 69 virtual bool isWorkerGlobalScope() const override final { return true; }
70 70
71 virtual ExecutionContext* executionContext() const OVERRIDE FINAL; 71 virtual ExecutionContext* executionContext() const override final;
72 72
73 virtual void countFeature(UseCounter::Feature) const; 73 virtual void countFeature(UseCounter::Feature) const;
74 virtual void countDeprecation(UseCounter::Feature) const; 74 virtual void countDeprecation(UseCounter::Feature) const;
75 75
76 const KURL& url() const { return m_url; } 76 const KURL& url() const { return m_url; }
77 KURL completeURL(const String&) const; 77 KURL completeURL(const String&) const;
78 78
79 virtual String userAgent(const KURL&) const OVERRIDE FINAL; 79 virtual String userAgent(const KURL&) const override final;
80 virtual void disableEval(const String& errorMessage) OVERRIDE FINAL; 80 virtual void disableEval(const String& errorMessage) override final;
81 81
82 WorkerScriptController* script() { return m_script.get(); } 82 WorkerScriptController* script() { return m_script.get(); }
83 void clearScript() { m_script.clear(); } 83 void clearScript() { m_script.clear(); }
84 void clearInspector(); 84 void clearInspector();
85 85
86 void dispose(); 86 void dispose();
87 87
88 WorkerThread* thread() const { return m_thread; } 88 WorkerThread* thread() const { return m_thread; }
89 89
90 virtual void postTask(PassOwnPtr<ExecutionContextTask>) OVERRIDE FINAL; // E xecutes the task on context's thread asynchronously. 90 virtual void postTask(PassOwnPtr<ExecutionContextTask>) override final; // E xecutes the task on context's thread asynchronously.
91 91
92 // WorkerGlobalScope 92 // WorkerGlobalScope
93 WorkerGlobalScope* self() { return this; } 93 WorkerGlobalScope* self() { return this; }
94 WorkerConsole* console(); 94 WorkerConsole* console();
95 WorkerLocation* location() const; 95 WorkerLocation* location() const;
96 void close(); 96 void close();
97 97
98 DEFINE_ATTRIBUTE_EVENT_LISTENER(error); 98 DEFINE_ATTRIBUTE_EVENT_LISTENER(error);
99 99
100 // WorkerUtils 100 // WorkerUtils
101 virtual void importScripts(const Vector<String>& urls, ExceptionState&); 101 virtual void importScripts(const Vector<String>& urls, ExceptionState&);
102 WorkerNavigator* navigator() const; 102 WorkerNavigator* navigator() const;
103 103
104 // ExecutionContextClient 104 // ExecutionContextClient
105 virtual WorkerEventQueue* eventQueue() const OVERRIDE FINAL; 105 virtual WorkerEventQueue* eventQueue() const override final;
106 virtual SecurityContext& securityContext() OVERRIDE FINAL { return *this; } 106 virtual SecurityContext& securityContext() override final { return *this; }
107 107
108 virtual bool isContextThread() const OVERRIDE FINAL; 108 virtual bool isContextThread() const override final;
109 virtual bool isJSExecutionForbidden() const OVERRIDE FINAL; 109 virtual bool isJSExecutionForbidden() const override final;
110 110
111 virtual double timerAlignmentInterval() const OVERRIDE FINAL; 111 virtual double timerAlignmentInterval() const override final;
112 112
113 WorkerInspectorController* workerInspectorController() { return m_workerInsp ectorController.get(); } 113 WorkerInspectorController* workerInspectorController() { return m_workerInsp ectorController.get(); }
114 114
115 bool isClosing() { return m_closing; } 115 bool isClosing() { return m_closing; }
116 116
117 virtual void stopFetch() { } 117 virtual void stopFetch() { }
118 118
119 bool idleNotification(); 119 bool idleNotification();
120 120
121 double timeOrigin() const { return m_timeOrigin; } 121 double timeOrigin() const { return m_timeOrigin; }
122 122
123 WorkerClients* clients() { return m_workerClients.get(); } 123 WorkerClients* clients() { return m_workerClients.get(); }
124 124
125 using SecurityContext::securityOrigin; 125 using SecurityContext::securityOrigin;
126 using SecurityContext::contentSecurityPolicy; 126 using SecurityContext::contentSecurityPolicy;
127 127
128 virtual void addConsoleMessage(PassRefPtrWillBeRawPtr<ConsoleMessage>) OVERR IDE FINAL; 128 virtual void addConsoleMessage(PassRefPtrWillBeRawPtr<ConsoleMessage>) overr ide final;
129 ConsoleMessageStorage* messageStorage(); 129 ConsoleMessageStorage* messageStorage();
130 130
131 virtual void trace(Visitor*) OVERRIDE; 131 virtual void trace(Visitor*) override;
132 132
133 protected: 133 protected:
134 WorkerGlobalScope(const KURL&, const String& userAgent, WorkerThread*, doubl e timeOrigin, const SecurityOrigin*, PassOwnPtrWillBeRawPtr<WorkerClients>); 134 WorkerGlobalScope(const KURL&, const String& userAgent, WorkerThread*, doubl e timeOrigin, const SecurityOrigin*, PassOwnPtrWillBeRawPtr<WorkerClients>);
135 void applyContentSecurityPolicyFromString(const String& contentSecurityPolic y, ContentSecurityPolicyHeaderType); 135 void applyContentSecurityPolicyFromString(const String& contentSecurityPolic y, ContentSecurityPolicyHeaderType);
136 136
137 virtual void logExceptionToConsole(const String& errorMessage, int scriptId, const String& sourceURL, int lineNumber, int columnNumber, PassRefPtrWillBeRawP tr<ScriptCallStack>) OVERRIDE; 137 virtual void logExceptionToConsole(const String& errorMessage, int scriptId, const String& sourceURL, int lineNumber, int columnNumber, PassRefPtrWillBeRawP tr<ScriptCallStack>) override;
138 void addMessageToWorkerConsole(PassRefPtrWillBeRawPtr<ConsoleMessage>); 138 void addMessageToWorkerConsole(PassRefPtrWillBeRawPtr<ConsoleMessage>);
139 139
140 private: 140 private:
141 #if !ENABLE(OILPAN) 141 #if !ENABLE(OILPAN)
142 virtual void refExecutionContext() OVERRIDE FINAL { ref(); } 142 virtual void refExecutionContext() override final { ref(); }
143 virtual void derefExecutionContext() OVERRIDE FINAL { deref(); } 143 virtual void derefExecutionContext() override final { deref(); }
144 #endif 144 #endif
145 145
146 virtual const KURL& virtualURL() const OVERRIDE FINAL; 146 virtual const KURL& virtualURL() const override final;
147 virtual KURL virtualCompleteURL(const String&) const OVERRIDE FINAL; 147 virtual KURL virtualCompleteURL(const String&) const override final;
148 148
149 virtual void reportBlockedScriptExecutionToInspector(const String& directive Text) OVERRIDE FINAL; 149 virtual void reportBlockedScriptExecutionToInspector(const String& directive Text) override final;
150 150
151 virtual EventTarget* errorEventTarget() OVERRIDE FINAL; 151 virtual EventTarget* errorEventTarget() override final;
152 virtual void didUpdateSecurityOrigin() OVERRIDE FINAL { } 152 virtual void didUpdateSecurityOrigin() override final { }
153 153
154 KURL m_url; 154 KURL m_url;
155 String m_userAgent; 155 String m_userAgent;
156 156
157 mutable RefPtrWillBeMember<WorkerConsole> m_console; 157 mutable RefPtrWillBeMember<WorkerConsole> m_console;
158 mutable RefPtrWillBeMember<WorkerLocation> m_location; 158 mutable RefPtrWillBeMember<WorkerLocation> m_location;
159 mutable RefPtrWillBeMember<WorkerNavigator> m_navigator; 159 mutable RefPtrWillBeMember<WorkerNavigator> m_navigator;
160 160
161 OwnPtr<WorkerScriptController> m_script; 161 OwnPtr<WorkerScriptController> m_script;
162 WorkerThread* m_thread; 162 WorkerThread* m_thread;
163 163
164 RefPtrWillBeMember<WorkerInspectorController> m_workerInspectorController; 164 RefPtrWillBeMember<WorkerInspectorController> m_workerInspectorController;
165 bool m_closing; 165 bool m_closing;
166 166
167 OwnPtrWillBeMember<WorkerEventQueue> m_eventQueue; 167 OwnPtrWillBeMember<WorkerEventQueue> m_eventQueue;
168 168
169 OwnPtrWillBeMember<WorkerClients> m_workerClients; 169 OwnPtrWillBeMember<WorkerClients> m_workerClients;
170 170
171 double m_timeOrigin; 171 double m_timeOrigin;
172 172
173 OwnPtrWillBeMember<ConsoleMessageStorage> m_messageStorage; 173 OwnPtrWillBeMember<ConsoleMessageStorage> m_messageStorage;
174 }; 174 };
175 175
176 DEFINE_TYPE_CASTS(WorkerGlobalScope, ExecutionContext, context, context->isWorke rGlobalScope(), context.isWorkerGlobalScope()); 176 DEFINE_TYPE_CASTS(WorkerGlobalScope, ExecutionContext, context, context->isWorke rGlobalScope(), context.isWorkerGlobalScope());
177 177
178 } // namespace blink 178 } // namespace blink
179 179
180 #endif // WorkerGlobalScope_h 180 #endif // WorkerGlobalScope_h
OLDNEW
« no previous file with comments | « Source/core/workers/WorkerEventQueue.h ('k') | Source/core/workers/WorkerInspectorProxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698