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

Side by Side Diff: Source/modules/serviceworkers/ServiceWorkerGlobalScope.cpp

Issue 1044203004: [Storage] Cache storage inspection on all the frames! (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 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 27 matching lines...) Expand all
38 #include "core/fetch/ResourceLoaderOptions.h" 38 #include "core/fetch/ResourceLoaderOptions.h"
39 #include "core/inspector/ConsoleMessage.h" 39 #include "core/inspector/ConsoleMessage.h"
40 #include "core/inspector/ScriptCallStack.h" 40 #include "core/inspector/ScriptCallStack.h"
41 #include "core/inspector/WorkerInspectorController.h" 41 #include "core/inspector/WorkerInspectorController.h"
42 #include "core/loader/ThreadableLoader.h" 42 #include "core/loader/ThreadableLoader.h"
43 #include "core/workers/WorkerClients.h" 43 #include "core/workers/WorkerClients.h"
44 #include "core/workers/WorkerThreadStartupData.h" 44 #include "core/workers/WorkerThreadStartupData.h"
45 #include "modules/EventTargetModules.h" 45 #include "modules/EventTargetModules.h"
46 #include "modules/fetch/GlobalFetch.h" 46 #include "modules/fetch/GlobalFetch.h"
47 #include "modules/serviceworkers/CacheStorage.h" 47 #include "modules/serviceworkers/CacheStorage.h"
48 #include "modules/serviceworkers/InspectorServiceWorkerCacheAgent.h"
49 #include "modules/serviceworkers/ServiceWorkerClients.h" 48 #include "modules/serviceworkers/ServiceWorkerClients.h"
50 #include "modules/serviceworkers/ServiceWorkerGlobalScopeClient.h" 49 #include "modules/serviceworkers/ServiceWorkerGlobalScopeClient.h"
51 #include "modules/serviceworkers/ServiceWorkerRegistration.h" 50 #include "modules/serviceworkers/ServiceWorkerRegistration.h"
52 #include "modules/serviceworkers/ServiceWorkerScriptCachedMetadataHandler.h" 51 #include "modules/serviceworkers/ServiceWorkerScriptCachedMetadataHandler.h"
53 #include "modules/serviceworkers/ServiceWorkerThread.h" 52 #include "modules/serviceworkers/ServiceWorkerThread.h"
54 #include "modules/serviceworkers/WaitUntilObserver.h" 53 #include "modules/serviceworkers/WaitUntilObserver.h"
55 #include "platform/network/ResourceRequest.h" 54 #include "platform/network/ResourceRequest.h"
56 #include "platform/weborigin/DatabaseIdentifier.h" 55 #include "platform/weborigin/DatabaseIdentifier.h"
57 #include "platform/weborigin/KURL.h" 56 #include "platform/weborigin/KURL.h"
58 #include "public/platform/WebServiceWorkerSkipWaitingCallbacks.h" 57 #include "public/platform/WebServiceWorkerSkipWaitingCallbacks.h"
(...skipping 27 matching lines...) Expand all
86 85
87 return context.release(); 86 return context.release();
88 } 87 }
89 88
90 ServiceWorkerGlobalScope::ServiceWorkerGlobalScope(const KURL& url, const String & userAgent, ServiceWorkerThread* thread, double timeOrigin, const SecurityOrigi n* starterOrigin, PassOwnPtrWillBeRawPtr<WorkerClients> workerClients) 89 ServiceWorkerGlobalScope::ServiceWorkerGlobalScope(const KURL& url, const String & userAgent, ServiceWorkerThread* thread, double timeOrigin, const SecurityOrigi n* starterOrigin, PassOwnPtrWillBeRawPtr<WorkerClients> workerClients)
91 : WorkerGlobalScope(url, userAgent, thread, timeOrigin, starterOrigin, worke rClients) 90 : WorkerGlobalScope(url, userAgent, thread, timeOrigin, starterOrigin, worke rClients)
92 , m_didEvaluateScript(false) 91 , m_didEvaluateScript(false)
93 , m_hadErrorInTopLevelEventHandler(false) 92 , m_hadErrorInTopLevelEventHandler(false)
94 , m_eventNestingLevel(0) 93 , m_eventNestingLevel(0)
95 { 94 {
96 workerInspectorController()->registerModuleAgent(InspectorServiceWorkerCache Agent::create(this));
horo 2015/04/01 03:39:07 DevTools for ServiceWorker is communicating with W
dmurph 2015/04/02 20:59:03 Ah, you're right. Fixed.
97 } 95 }
98 96
99 ServiceWorkerGlobalScope::~ServiceWorkerGlobalScope() 97 ServiceWorkerGlobalScope::~ServiceWorkerGlobalScope()
100 { 98 {
101 } 99 }
102 100
103 void ServiceWorkerGlobalScope::didEvaluateWorkerScript() 101 void ServiceWorkerGlobalScope::didEvaluateWorkerScript()
104 { 102 {
105 m_didEvaluateScript = true; 103 m_didEvaluateScript = true;
106 } 104 }
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 void ServiceWorkerGlobalScope::logExceptionToConsole(const String& errorMessage, int scriptId, const String& sourceURL, int lineNumber, int columnNumber, PassRe fPtrWillBeRawPtr<ScriptCallStack> callStack) 225 void ServiceWorkerGlobalScope::logExceptionToConsole(const String& errorMessage, int scriptId, const String& sourceURL, int lineNumber, int columnNumber, PassRe fPtrWillBeRawPtr<ScriptCallStack> callStack)
228 { 226 {
229 WorkerGlobalScope::logExceptionToConsole(errorMessage, scriptId, sourceURL, lineNumber, columnNumber, callStack); 227 WorkerGlobalScope::logExceptionToConsole(errorMessage, scriptId, sourceURL, lineNumber, columnNumber, callStack);
230 RefPtrWillBeRawPtr<ConsoleMessage> consoleMessage = ConsoleMessage::create(J SMessageSource, ErrorMessageLevel, errorMessage, sourceURL, lineNumber); 228 RefPtrWillBeRawPtr<ConsoleMessage> consoleMessage = ConsoleMessage::create(J SMessageSource, ErrorMessageLevel, errorMessage, sourceURL, lineNumber);
231 consoleMessage->setScriptId(scriptId); 229 consoleMessage->setScriptId(scriptId);
232 consoleMessage->setCallStack(callStack); 230 consoleMessage->setCallStack(callStack);
233 addMessageToWorkerConsole(consoleMessage.release()); 231 addMessageToWorkerConsole(consoleMessage.release());
234 } 232 }
235 233
236 } // namespace blink 234 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698