OLD | NEW |
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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 } | 82 } |
83 | 83 |
84 String ServiceWorkerGlobalScope::scope(ExecutionContext* context) | 84 String ServiceWorkerGlobalScope::scope(ExecutionContext* context) |
85 { | 85 { |
86 return ServiceWorkerGlobalScopeClient::from(context)->scope().string(); | 86 return ServiceWorkerGlobalScopeClient::from(context)->scope().string(); |
87 } | 87 } |
88 | 88 |
89 PassRefPtrWillBeRawPtr<CacheStorage> ServiceWorkerGlobalScope::caches(ExecutionC
ontext* context) | 89 PassRefPtrWillBeRawPtr<CacheStorage> ServiceWorkerGlobalScope::caches(ExecutionC
ontext* context) |
90 { | 90 { |
91 if (!m_cacheStorage) | 91 if (!m_cacheStorage) |
92 m_cacheStorage = CacheStorage::create(); | 92 m_cacheStorage = CacheStorage::create(ServiceWorkerGlobalScopeClient::fr
om(context)->cacheStorage()); |
93 return m_cacheStorage; | 93 return m_cacheStorage; |
94 } | 94 } |
95 | 95 |
96 ScriptPromise ServiceWorkerGlobalScope::fetch(ScriptState* scriptState, Request*
request) | 96 ScriptPromise ServiceWorkerGlobalScope::fetch(ScriptState* scriptState, Request*
request) |
97 { | 97 { |
98 OwnPtr<ResourceRequest> resourceRequest(request->createResourceRequest()); | 98 OwnPtr<ResourceRequest> resourceRequest(request->createResourceRequest()); |
99 resourceRequest->setRequestContext(blink::WebURLRequest::RequestContextFetch
); | 99 resourceRequest->setRequestContext(blink::WebURLRequest::RequestContextFetch
); |
100 return m_fetchManager->fetch(scriptState, resourceRequest.release()); | 100 return m_fetchManager->fetch(scriptState, resourceRequest.release()); |
101 } | 101 } |
102 | 102 |
(...skipping 27 matching lines...) Expand all Loading... |
130 WorkerGlobalScope::trace(visitor); | 130 WorkerGlobalScope::trace(visitor); |
131 } | 131 } |
132 | 132 |
133 void ServiceWorkerGlobalScope::logExceptionToConsole(const String& errorMessage,
const String& sourceURL, int lineNumber, int columnNumber, PassRefPtrWillBeRawP
tr<ScriptCallStack> callStack) | 133 void ServiceWorkerGlobalScope::logExceptionToConsole(const String& errorMessage,
const String& sourceURL, int lineNumber, int columnNumber, PassRefPtrWillBeRawP
tr<ScriptCallStack> callStack) |
134 { | 134 { |
135 WorkerGlobalScope::logExceptionToConsole(errorMessage, sourceURL, lineNumber
, columnNumber, callStack); | 135 WorkerGlobalScope::logExceptionToConsole(errorMessage, sourceURL, lineNumber
, columnNumber, callStack); |
136 addMessageToWorkerConsole(JSMessageSource, ErrorMessageLevel, errorMessage,
sourceURL, lineNumber, callStack, 0); | 136 addMessageToWorkerConsole(JSMessageSource, ErrorMessageLevel, errorMessage,
sourceURL, lineNumber, callStack, 0); |
137 } | 137 } |
138 | 138 |
139 } // namespace blink | 139 } // namespace blink |
OLD | NEW |