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

Side by Side Diff: third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerRegistration.cpp

Issue 1773813007: blink: Rename modules/ method to prefix with get when they collide. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: clash-modules: rebase-fixes Created 4 years, 9 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 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "modules/serviceworkers/ServiceWorkerRegistration.h" 5 #include "modules/serviceworkers/ServiceWorkerRegistration.h"
6 6
7 #include "bindings/core/v8/CallbackPromiseAdapter.h" 7 #include "bindings/core/v8/CallbackPromiseAdapter.h"
8 #include "bindings/core/v8/ScriptPromise.h" 8 #include "bindings/core/v8/ScriptPromise.h"
9 #include "bindings/core/v8/ScriptState.h" 9 #include "bindings/core/v8/ScriptState.h"
10 #include "core/dom/DOMException.h" 10 #include "core/dom/DOMException.h"
(...skipping 12 matching lines...) Expand all
23 return EventTargetNames::ServiceWorkerRegistration; 23 return EventTargetNames::ServiceWorkerRegistration;
24 } 24 }
25 25
26 void ServiceWorkerRegistration::dispatchUpdateFoundEvent() 26 void ServiceWorkerRegistration::dispatchUpdateFoundEvent()
27 { 27 {
28 dispatchEvent(Event::create(EventTypeNames::updatefound)); 28 dispatchEvent(Event::create(EventTypeNames::updatefound));
29 } 29 }
30 30
31 void ServiceWorkerRegistration::setInstalling(WebPassOwnPtr<WebServiceWorker::Ha ndle> handle) 31 void ServiceWorkerRegistration::setInstalling(WebPassOwnPtr<WebServiceWorker::Ha ndle> handle)
32 { 32 {
33 if (!executionContext()) 33 if (!getExecutionContext())
34 return; 34 return;
35 m_installing = ServiceWorker::from(executionContext(), handle.release()); 35 m_installing = ServiceWorker::from(getExecutionContext(), handle.release());
36 } 36 }
37 37
38 void ServiceWorkerRegistration::setWaiting(WebPassOwnPtr<WebServiceWorker::Handl e> handle) 38 void ServiceWorkerRegistration::setWaiting(WebPassOwnPtr<WebServiceWorker::Handl e> handle)
39 { 39 {
40 if (!executionContext()) 40 if (!getExecutionContext())
41 return; 41 return;
42 m_waiting = ServiceWorker::from(executionContext(), handle.release()); 42 m_waiting = ServiceWorker::from(getExecutionContext(), handle.release());
43 } 43 }
44 44
45 void ServiceWorkerRegistration::setActive(WebPassOwnPtr<WebServiceWorker::Handle > handle) 45 void ServiceWorkerRegistration::setActive(WebPassOwnPtr<WebServiceWorker::Handle > handle)
46 { 46 {
47 if (!executionContext()) 47 if (!getExecutionContext())
48 return; 48 return;
49 m_active = ServiceWorker::from(executionContext(), handle.release()); 49 m_active = ServiceWorker::from(getExecutionContext(), handle.release());
50 } 50 }
51 51
52 ServiceWorkerRegistration* ServiceWorkerRegistration::getOrCreate(ExecutionConte xt* executionContext, PassOwnPtr<WebServiceWorkerRegistration::Handle> handle) 52 ServiceWorkerRegistration* ServiceWorkerRegistration::getOrCreate(ExecutionConte xt* executionContext, PassOwnPtr<WebServiceWorkerRegistration::Handle> handle)
53 { 53 {
54 ASSERT(handle); 54 ASSERT(handle);
55 55
56 ServiceWorkerRegistration* existingRegistration = static_cast<ServiceWorkerR egistration*>(handle->registration()->proxy()); 56 ServiceWorkerRegistration* existingRegistration = static_cast<ServiceWorkerR egistration*>(handle->registration()->proxy());
57 if (existingRegistration) { 57 if (existingRegistration) {
58 ASSERT(existingRegistration->executionContext() == executionContext); 58 ASSERT(existingRegistration->getExecutionContext() == executionContext);
59 return existingRegistration; 59 return existingRegistration;
60 } 60 }
61 61
62 ServiceWorkerRegistration* newRegistration = new ServiceWorkerRegistration(e xecutionContext, handle); 62 ServiceWorkerRegistration* newRegistration = new ServiceWorkerRegistration(e xecutionContext, handle);
63 newRegistration->suspendIfNeeded(); 63 newRegistration->suspendIfNeeded();
64 return newRegistration; 64 return newRegistration;
65 } 65 }
66 66
67 String ServiceWorkerRegistration::scope() const 67 String ServiceWorkerRegistration::scope() const
68 { 68 {
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 134
135 void ServiceWorkerRegistration::stop() 135 void ServiceWorkerRegistration::stop()
136 { 136 {
137 if (m_stopped) 137 if (m_stopped)
138 return; 138 return;
139 m_stopped = true; 139 m_stopped = true;
140 m_handle->registration()->proxyStopped(); 140 m_handle->registration()->proxyStopped();
141 } 141 }
142 142
143 } // namespace blink 143 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698