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

Side by Side Diff: Source/WebCore/workers/DefaultSharedWorkerRepository.cpp

Issue 13646003: DevTools: Remove ENABLE(INSPECTOR) and ENABLE(JAVASCRIPT_DEBUGGER) from the code. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 8 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) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 String name() const { return m_name.isolatedCopy(); } 76 String name() const { return m_name.isolatedCopy(); }
77 bool matches(const String& name, PassRefPtr<SecurityOrigin> origin, const KU RL& urlToMatch) const; 77 bool matches(const String& name, PassRefPtr<SecurityOrigin> origin, const KU RL& urlToMatch) const;
78 78
79 // WorkerLoaderProxy 79 // WorkerLoaderProxy
80 virtual void postTaskToLoader(PassOwnPtr<ScriptExecutionContext::Task>); 80 virtual void postTaskToLoader(PassOwnPtr<ScriptExecutionContext::Task>);
81 virtual bool postTaskForModeToWorkerContext(PassOwnPtr<ScriptExecutionContex t::Task>, const String&); 81 virtual bool postTaskForModeToWorkerContext(PassOwnPtr<ScriptExecutionContex t::Task>, const String&);
82 82
83 // WorkerReportingProxy 83 // WorkerReportingProxy
84 virtual void postExceptionToWorkerObject(const String& errorMessage, int lin eNumber, const String& sourceURL); 84 virtual void postExceptionToWorkerObject(const String& errorMessage, int lin eNumber, const String& sourceURL);
85 virtual void postConsoleMessageToWorkerObject(MessageSource, MessageLevel, c onst String& message, int lineNumber, const String& sourceURL); 85 virtual void postConsoleMessageToWorkerObject(MessageSource, MessageLevel, c onst String& message, int lineNumber, const String& sourceURL);
86 #if ENABLE(INSPECTOR)
87 virtual void postMessageToPageInspector(const String&); 86 virtual void postMessageToPageInspector(const String&);
88 virtual void updateInspectorStateCookie(const String&); 87 virtual void updateInspectorStateCookie(const String&);
89 #endif
90 virtual void workerContextClosed(); 88 virtual void workerContextClosed();
91 virtual void workerContextDestroyed(); 89 virtual void workerContextDestroyed();
92 90
93 // Updates the list of the worker's documents, per section 4.5 of the WebWor kers spec. 91 // Updates the list of the worker's documents, per section 4.5 of the WebWor kers spec.
94 void addToWorkerDocuments(ScriptExecutionContext*); 92 void addToWorkerDocuments(ScriptExecutionContext*);
95 93
96 bool isInWorkerDocuments(Document* document) { return m_workerDocuments.cont ains(document); } 94 bool isInWorkerDocuments(Document* document) { return m_workerDocuments.cont ains(document); }
97 95
98 // Removes a detached document from the list of worker's documents. May set the closing flag if this is the last document in the list. 96 // Removes a detached document from the list of worker's documents. May set the closing flag if this is the last document in the list.
99 void documentDetached(Document*); 97 void documentDetached(Document*);
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 document->addConsoleMessage(source, level, message, sourceURL, lineNumber); 191 document->addConsoleMessage(source, level, message, sourceURL, lineNumber);
194 } 192 }
195 193
196 void SharedWorkerProxy::postConsoleMessageToWorkerObject(MessageSource source, M essageLevel level, const String& message, int lineNumber, const String& sourceUR L) 194 void SharedWorkerProxy::postConsoleMessageToWorkerObject(MessageSource source, M essageLevel level, const String& message, int lineNumber, const String& sourceUR L)
197 { 195 {
198 MutexLocker lock(m_workerDocumentsLock); 196 MutexLocker lock(m_workerDocumentsLock);
199 for (HashSet<Document*>::iterator iter = m_workerDocuments.begin(); iter != m_workerDocuments.end(); ++iter) 197 for (HashSet<Document*>::iterator iter = m_workerDocuments.begin(); iter != m_workerDocuments.end(); ++iter)
200 (*iter)->postTask(createCallbackTask(&postConsoleMessageTask, source, le vel, message, sourceURL, lineNumber)); 198 (*iter)->postTask(createCallbackTask(&postConsoleMessageTask, source, le vel, message, sourceURL, lineNumber));
201 } 199 }
202 200
203 #if ENABLE(INSPECTOR)
204 void SharedWorkerProxy::postMessageToPageInspector(const String&) 201 void SharedWorkerProxy::postMessageToPageInspector(const String&)
205 { 202 {
206 notImplemented(); 203 notImplemented();
207 } 204 }
208 205
209 void SharedWorkerProxy::updateInspectorStateCookie(const String&) 206 void SharedWorkerProxy::updateInspectorStateCookie(const String&)
210 { 207 {
211 notImplemented(); 208 notImplemented();
212 } 209 }
213 #endif
214 210
215 void SharedWorkerProxy::workerContextClosed() 211 void SharedWorkerProxy::workerContextClosed()
216 { 212 {
217 if (isClosing()) 213 if (isClosing())
218 return; 214 return;
219 close(); 215 close();
220 } 216 }
221 217
222 void SharedWorkerProxy::workerContextDestroyed() 218 void SharedWorkerProxy::workerContextDestroyed()
223 { 219 {
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
439 { 435 {
440 } 436 }
441 437
442 DefaultSharedWorkerRepository::~DefaultSharedWorkerRepository() 438 DefaultSharedWorkerRepository::~DefaultSharedWorkerRepository()
443 { 439 {
444 } 440 }
445 441
446 } // namespace WebCore 442 } // namespace WebCore
447 443
448 #endif // ENABLE(SHARED_WORKERS) 444 #endif // ENABLE(SHARED_WORKERS)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698