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

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

Issue 472023002: [DevTools] ConsoleAPI messages pass through frame console (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: PassRefPtr<ConsoleMessage> -> PassRefPtrWillBeRawPtr<ConsoleMessage> Created 6 years, 4 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/WorkerConsole.cpp ('k') | no next file » | 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 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 130
131 bool idleNotification(); 131 bool idleNotification();
132 132
133 double timeOrigin() const { return m_timeOrigin; } 133 double timeOrigin() const { return m_timeOrigin; }
134 134
135 WorkerClients* clients() { return m_workerClients.get(); } 135 WorkerClients* clients() { return m_workerClients.get(); }
136 136
137 using SecurityContext::securityOrigin; 137 using SecurityContext::securityOrigin;
138 using SecurityContext::contentSecurityPolicy; 138 using SecurityContext::contentSecurityPolicy;
139 139
140 virtual void addMessage(PassRefPtrWillBeRawPtr<ConsoleMessage>) OVERRIDE FINAL;
141
140 virtual void trace(Visitor*) OVERRIDE; 142 virtual void trace(Visitor*) OVERRIDE;
141 143
142 protected: 144 protected:
143 WorkerGlobalScope(const KURL&, const String& userAgent, WorkerThread*, d ouble timeOrigin, PassOwnPtrWillBeRawPtr<WorkerClients>); 145 WorkerGlobalScope(const KURL&, const String& userAgent, WorkerThread*, d ouble timeOrigin, PassOwnPtrWillBeRawPtr<WorkerClients>);
144 void applyContentSecurityPolicyFromString(const String& contentSecurityP olicy, ContentSecurityPolicyHeaderType); 146 void applyContentSecurityPolicyFromString(const String& contentSecurityP olicy, ContentSecurityPolicyHeaderType);
145 147
146 virtual void logExceptionToConsole(const String& errorMessage, const Str ing& sourceURL, int lineNumber, int columnNumber, PassRefPtrWillBeRawPtr<ScriptC allStack>) OVERRIDE; 148 virtual void logExceptionToConsole(const String& errorMessage, const Str ing& sourceURL, int lineNumber, int columnNumber, PassRefPtrWillBeRawPtr<ScriptC allStack>) OVERRIDE;
147 void addMessageToWorkerConsole(PassRefPtrWillBeRawPtr<ConsoleMessage>); 149 void addMessageToWorkerConsole(PassRefPtrWillBeRawPtr<ConsoleMessage>);
148 150
149 private: 151 private:
150 #if !ENABLE(OILPAN) 152 #if !ENABLE(OILPAN)
151 virtual void refExecutionContext() OVERRIDE FINAL { ref(); } 153 virtual void refExecutionContext() OVERRIDE FINAL { ref(); }
152 virtual void derefExecutionContext() OVERRIDE FINAL { deref(); } 154 virtual void derefExecutionContext() OVERRIDE FINAL { deref(); }
153 #endif 155 #endif
154 156
155 virtual const KURL& virtualURL() const OVERRIDE FINAL; 157 virtual const KURL& virtualURL() const OVERRIDE FINAL;
156 virtual KURL virtualCompleteURL(const String&) const OVERRIDE FINAL; 158 virtual KURL virtualCompleteURL(const String&) const OVERRIDE FINAL;
157 159
158 virtual void reportBlockedScriptExecutionToInspector(const String& direc tiveText) OVERRIDE FINAL; 160 virtual void reportBlockedScriptExecutionToInspector(const String& direc tiveText) OVERRIDE FINAL;
159 virtual void addMessage(PassRefPtrWillBeRawPtr<ConsoleMessage>) OVERRIDE FINAL;
160 161
161 virtual EventTarget* errorEventTarget() OVERRIDE FINAL; 162 virtual EventTarget* errorEventTarget() OVERRIDE FINAL;
162 virtual void didUpdateSecurityOrigin() OVERRIDE FINAL { } 163 virtual void didUpdateSecurityOrigin() OVERRIDE FINAL { }
163 164
164 KURL m_url; 165 KURL m_url;
165 String m_userAgent; 166 String m_userAgent;
166 167
167 mutable RefPtrWillBeMember<WorkerConsole> m_console; 168 mutable RefPtrWillBeMember<WorkerConsole> m_console;
168 mutable RefPtrWillBeMember<WorkerLocation> m_location; 169 mutable RefPtrWillBeMember<WorkerLocation> m_location;
169 mutable RefPtrWillBeMember<WorkerNavigator> m_navigator; 170 mutable RefPtrWillBeMember<WorkerNavigator> m_navigator;
(...skipping 10 matching lines...) Expand all
180 181
181 double m_timeOrigin; 182 double m_timeOrigin;
182 TerminationObserver* m_terminationObserver; 183 TerminationObserver* m_terminationObserver;
183 }; 184 };
184 185
185 DEFINE_TYPE_CASTS(WorkerGlobalScope, ExecutionContext, context, context->isWorke rGlobalScope(), context.isWorkerGlobalScope()); 186 DEFINE_TYPE_CASTS(WorkerGlobalScope, ExecutionContext, context, context->isWorke rGlobalScope(), context.isWorkerGlobalScope());
186 187
187 } // namespace blink 188 } // namespace blink
188 189
189 #endif // WorkerGlobalScope_h 190 #endif // WorkerGlobalScope_h
OLDNEW
« no previous file with comments | « Source/core/workers/WorkerConsole.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698