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

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

Issue 464293002: [DevTools] ConsoleMessage storage moved from ConsoleAgent (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@remove-can-generate
Patch Set: Created 6 years, 3 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.h ('k') | Source/core/workers/WorkerGlobalScope.cpp » ('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 16 matching lines...) Expand all
27 #ifndef WorkerGlobalScope_h 27 #ifndef WorkerGlobalScope_h
28 #define WorkerGlobalScope_h 28 #define WorkerGlobalScope_h
29 29
30 #include "bindings/core/v8/WorkerScriptController.h" 30 #include "bindings/core/v8/WorkerScriptController.h"
31 #include "core/dom/ExecutionContext.h" 31 #include "core/dom/ExecutionContext.h"
32 #include "core/events/EventListener.h" 32 #include "core/events/EventListener.h"
33 #include "core/events/EventTarget.h" 33 #include "core/events/EventTarget.h"
34 #include "core/frame/DOMWindowBase64.h" 34 #include "core/frame/DOMWindowBase64.h"
35 #include "core/frame/UseCounter.h" 35 #include "core/frame/UseCounter.h"
36 #include "core/frame/csp/ContentSecurityPolicy.h" 36 #include "core/frame/csp/ContentSecurityPolicy.h"
37 #include "core/inspector/ConsoleMessage.h"
38 #include "core/workers/WorkerEventQueue.h" 37 #include "core/workers/WorkerEventQueue.h"
39 #include "platform/heap/Handle.h" 38 #include "platform/heap/Handle.h"
40 #include "platform/network/ContentSecurityPolicyParsers.h" 39 #include "platform/network/ContentSecurityPolicyParsers.h"
41 #include "wtf/Assertions.h" 40 #include "wtf/Assertions.h"
42 #include "wtf/HashMap.h" 41 #include "wtf/HashMap.h"
43 #include "wtf/OwnPtr.h" 42 #include "wtf/OwnPtr.h"
44 #include "wtf/PassRefPtr.h" 43 #include "wtf/PassRefPtr.h"
45 #include "wtf/RefCounted.h" 44 #include "wtf/RefCounted.h"
46 #include "wtf/RefPtr.h" 45 #include "wtf/RefPtr.h"
47 #include "wtf/text/AtomicStringHash.h" 46 #include "wtf/text/AtomicStringHash.h"
48 47
49 namespace blink { 48 namespace blink {
50 49
51 class Blob; 50 class Blob;
51 class ConsoleMessage;
52 class ConsoleMessageStorage;
52 class ExceptionState; 53 class ExceptionState;
53 class ScheduledAction; 54 class ScheduledAction;
54 class WorkerClients; 55 class WorkerClients;
55 class WorkerConsole; 56 class WorkerConsole;
56 class WorkerInspectorController; 57 class WorkerInspectorController;
57 class WorkerLocation; 58 class WorkerLocation;
58 class WorkerNavigator; 59 class WorkerNavigator;
59 class WorkerThread; 60 class WorkerThread;
60 61
61 class WorkerGlobalScope : public RefCountedWillBeGarbageCollectedFinalized<W orkerGlobalScope>, public SecurityContext, public ExecutionContext, public Execu tionContextClient, public WillBeHeapSupplementable<WorkerGlobalScope>, public Ev entTargetWithInlineData, public DOMWindowBase64 { 62 class WorkerGlobalScope : public RefCountedWillBeGarbageCollectedFinalized<W orkerGlobalScope>, public SecurityContext, public ExecutionContext, public Execu tionContextClient, public WillBeHeapSupplementable<WorkerGlobalScope>, public Ev entTargetWithInlineData, public DOMWindowBase64 {
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 bool idleNotification(); 132 bool idleNotification();
132 133
133 double timeOrigin() const { return m_timeOrigin; } 134 double timeOrigin() const { return m_timeOrigin; }
134 135
135 WorkerClients* clients() { return m_workerClients.get(); } 136 WorkerClients* clients() { return m_workerClients.get(); }
136 137
137 using SecurityContext::securityOrigin; 138 using SecurityContext::securityOrigin;
138 using SecurityContext::contentSecurityPolicy; 139 using SecurityContext::contentSecurityPolicy;
139 140
140 virtual void addMessage(PassRefPtrWillBeRawPtr<ConsoleMessage>) OVERRIDE FINAL; 141 virtual void addMessage(PassRefPtrWillBeRawPtr<ConsoleMessage>) OVERRIDE FINAL;
142 ConsoleMessageStorage* messageStorage();
141 143
142 virtual void trace(Visitor*) OVERRIDE; 144 virtual void trace(Visitor*) OVERRIDE;
143 145
144 protected: 146 protected:
145 WorkerGlobalScope(const KURL&, const String& userAgent, WorkerThread*, d ouble timeOrigin, PassOwnPtrWillBeRawPtr<WorkerClients>); 147 WorkerGlobalScope(const KURL&, const String& userAgent, WorkerThread*, d ouble timeOrigin, PassOwnPtrWillBeRawPtr<WorkerClients>);
146 void applyContentSecurityPolicyFromString(const String& contentSecurityP olicy, ContentSecurityPolicyHeaderType); 148 void applyContentSecurityPolicyFromString(const String& contentSecurityP olicy, ContentSecurityPolicyHeaderType);
147 149
148 virtual void logExceptionToConsole(const String& errorMessage, const Str ing& sourceURL, int lineNumber, int columnNumber, PassRefPtrWillBeRawPtr<ScriptC allStack>) OVERRIDE; 150 virtual void logExceptionToConsole(const String& errorMessage, const Str ing& sourceURL, int lineNumber, int columnNumber, PassRefPtrWillBeRawPtr<ScriptC allStack>) OVERRIDE;
149 void addMessageToWorkerConsole(PassRefPtrWillBeRawPtr<ConsoleMessage>); 151 void addMessageToWorkerConsole(PassRefPtrWillBeRawPtr<ConsoleMessage>);
150 152
(...skipping 23 matching lines...) Expand all
174 176
175 RefPtrWillBeMember<WorkerInspectorController> m_workerInspectorControlle r; 177 RefPtrWillBeMember<WorkerInspectorController> m_workerInspectorControlle r;
176 bool m_closing; 178 bool m_closing;
177 179
178 OwnPtrWillBeMember<WorkerEventQueue> m_eventQueue; 180 OwnPtrWillBeMember<WorkerEventQueue> m_eventQueue;
179 181
180 OwnPtrWillBeMember<WorkerClients> m_workerClients; 182 OwnPtrWillBeMember<WorkerClients> m_workerClients;
181 183
182 double m_timeOrigin; 184 double m_timeOrigin;
183 TerminationObserver* m_terminationObserver; 185 TerminationObserver* m_terminationObserver;
186
187 OwnPtr<ConsoleMessageStorage> m_messageStorage;
184 }; 188 };
185 189
186 DEFINE_TYPE_CASTS(WorkerGlobalScope, ExecutionContext, context, context->isWorke rGlobalScope(), context.isWorkerGlobalScope()); 190 DEFINE_TYPE_CASTS(WorkerGlobalScope, ExecutionContext, context, context->isWorke rGlobalScope(), context.isWorkerGlobalScope());
187 191
188 } // namespace blink 192 } // namespace blink
189 193
190 #endif // WorkerGlobalScope_h 194 #endif // WorkerGlobalScope_h
OLDNEW
« no previous file with comments | « Source/core/workers/WorkerConsole.h ('k') | Source/core/workers/WorkerGlobalScope.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698