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

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

Issue 540283003: bindings: Retires ScriptWrappable::init, etc. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Addressed a review comment. Created 6 years, 3 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 // 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 "config.h" 5 #include "config.h"
6 #include "ServiceWorkerRegistration.h" 6 #include "ServiceWorkerRegistration.h"
7 7
8 #include "bindings/core/v8/CallbackPromiseAdapter.h" 8 #include "bindings/core/v8/CallbackPromiseAdapter.h"
9 #include "bindings/core/v8/ScriptPromise.h" 9 #include "bindings/core/v8/ScriptPromise.h"
10 #include "bindings/core/v8/ScriptPromiseResolver.h" 10 #include "bindings/core/v8/ScriptPromiseResolver.h"
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 } 140 }
141 141
142 ServiceWorkerRegistration::ServiceWorkerRegistration(ExecutionContext* execution Context, PassOwnPtr<WebServiceWorkerRegistration> outerRegistration) 142 ServiceWorkerRegistration::ServiceWorkerRegistration(ExecutionContext* execution Context, PassOwnPtr<WebServiceWorkerRegistration> outerRegistration)
143 : ActiveDOMObject(executionContext) 143 : ActiveDOMObject(executionContext)
144 , WebServiceWorkerRegistrationProxy(this) 144 , WebServiceWorkerRegistrationProxy(this)
145 , m_outerRegistration(outerRegistration) 145 , m_outerRegistration(outerRegistration)
146 , m_provider(0) 146 , m_provider(0)
147 , m_stopped(false) 147 , m_stopped(false)
148 { 148 {
149 ASSERT(m_outerRegistration); 149 ASSERT(m_outerRegistration);
150 ScriptWrappable::init(this);
151 150
152 if (!executionContext) 151 if (!executionContext)
153 return; 152 return;
154 if (ServiceWorkerContainerClient* client = ServiceWorkerContainerClient::fro m(executionContext)) 153 if (ServiceWorkerContainerClient* client = ServiceWorkerContainerClient::fro m(executionContext))
155 m_provider = client->provider(); 154 m_provider = client->provider();
156 m_outerRegistration->setProxy(this); 155 m_outerRegistration->setProxy(this);
157 } 156 }
158 157
159 void ServiceWorkerRegistration::trace(Visitor* visitor) 158 void ServiceWorkerRegistration::trace(Visitor* visitor)
160 { 159 {
(...skipping 10 matching lines...) Expand all
171 170
172 void ServiceWorkerRegistration::stop() 171 void ServiceWorkerRegistration::stop()
173 { 172 {
174 if (m_stopped) 173 if (m_stopped)
175 return; 174 return;
176 m_stopped = true; 175 m_stopped = true;
177 m_outerRegistration->proxyStopped(); 176 m_outerRegistration->proxyStopped();
178 } 177 }
179 178
180 } // namespace blink 179 } // namespace blink
OLDNEW
« no previous file with comments | « Source/modules/serviceworkers/ServiceWorkerGlobalScope.cpp ('k') | Source/modules/speech/SpeechGrammar.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698