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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 if (!m_clients) | 117 if (!m_clients) |
118 m_clients = ServiceWorkerClients::create(); | 118 m_clients = ServiceWorkerClients::create(); |
119 return m_clients; | 119 return m_clients; |
120 } | 120 } |
121 | 121 |
122 ServiceWorkerRegistration* ServiceWorkerGlobalScope::registration() | 122 ServiceWorkerRegistration* ServiceWorkerGlobalScope::registration() |
123 { | 123 { |
124 return m_registration; | 124 return m_registration; |
125 } | 125 } |
126 | 126 |
127 void ServiceWorkerGlobalScope::close(ExceptionState& exceptionState) | |
128 { | |
129 exceptionState.throwDOMException(InvalidAccessError, "Not supported."); | |
130 } | |
131 | |
132 ScriptPromise ServiceWorkerGlobalScope::skipWaiting(ScriptState* scriptState) | 127 ScriptPromise ServiceWorkerGlobalScope::skipWaiting(ScriptState* scriptState) |
133 { | 128 { |
134 ExecutionContext* executionContext = scriptState->getExecutionContext(); | 129 ExecutionContext* executionContext = scriptState->getExecutionContext(); |
135 // FIXME: short-term fix, see details at: https://codereview.chromium.org/53
5193002/. | 130 // FIXME: short-term fix, see details at: https://codereview.chromium.org/53
5193002/. |
136 if (!executionContext) | 131 if (!executionContext) |
137 return ScriptPromise(); | 132 return ScriptPromise(); |
138 | 133 |
139 ScriptPromiseResolver* resolver = ScriptPromiseResolver::create(scriptState)
; | 134 ScriptPromiseResolver* resolver = ScriptPromiseResolver::create(scriptState)
; |
140 ScriptPromise promise = resolver->promise(); | 135 ScriptPromise promise = resolver->promise(); |
141 | 136 |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
223 } | 218 } |
224 | 219 |
225 void ServiceWorkerGlobalScope::scriptLoaded(size_t scriptSize, size_t cachedMeta
dataSize) | 220 void ServiceWorkerGlobalScope::scriptLoaded(size_t scriptSize, size_t cachedMeta
dataSize) |
226 { | 221 { |
227 ++m_scriptCount; | 222 ++m_scriptCount; |
228 m_scriptTotalSize += scriptSize; | 223 m_scriptTotalSize += scriptSize; |
229 m_scriptCachedMetadataTotalSize += cachedMetadataSize; | 224 m_scriptCachedMetadataTotalSize += cachedMetadataSize; |
230 } | 225 } |
231 | 226 |
232 } // namespace blink | 227 } // namespace blink |
OLD | NEW |