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

Side by Side Diff: third_party/WebKit/Source/modules/payments/PaymentAppServiceWorkerRegistration.cpp

Issue 2553163003: Remove ContextLifecycleObserver from PaymentAppManager (Closed)
Patch Set: Created 4 years 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
« no previous file with comments | « third_party/WebKit/Source/modules/payments/PaymentAppManager.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/payments/PaymentAppServiceWorkerRegistration.h" 5 #include "modules/payments/PaymentAppServiceWorkerRegistration.h"
6 6
7 #include "bindings/core/v8/ScriptState.h" 7 #include "bindings/core/v8/ScriptState.h"
8 #include "core/dom/Document.h" 8 #include "core/dom/Document.h"
9 #include "modules/payments/PaymentAppManager.h" 9 #include "modules/payments/PaymentAppManager.h"
10 #include "modules/serviceworkers/ServiceWorkerRegistration.h" 10 #include "modules/serviceworkers/ServiceWorkerRegistration.h"
(...skipping 22 matching lines...) Expand all
33 PaymentAppManager* PaymentAppServiceWorkerRegistration::paymentAppManager( 33 PaymentAppManager* PaymentAppServiceWorkerRegistration::paymentAppManager(
34 ScriptState* scriptState, 34 ScriptState* scriptState,
35 ServiceWorkerRegistration& registration) { 35 ServiceWorkerRegistration& registration) {
36 return PaymentAppServiceWorkerRegistration::from(registration) 36 return PaymentAppServiceWorkerRegistration::from(registration)
37 .paymentAppManager(scriptState); 37 .paymentAppManager(scriptState);
38 } 38 }
39 39
40 PaymentAppManager* PaymentAppServiceWorkerRegistration::paymentAppManager( 40 PaymentAppManager* PaymentAppServiceWorkerRegistration::paymentAppManager(
41 ScriptState* scriptState) { 41 ScriptState* scriptState) {
42 if (!m_paymentAppManager) { 42 if (!m_paymentAppManager) {
43 m_paymentAppManager = PaymentAppManager::create( 43 m_paymentAppManager = PaymentAppManager::create(m_registration);
44 scriptState->getExecutionContext(), m_registration);
45 } 44 }
46 return m_paymentAppManager.get(); 45 return m_paymentAppManager.get();
47 } 46 }
48 47
49 DEFINE_TRACE(PaymentAppServiceWorkerRegistration) { 48 DEFINE_TRACE(PaymentAppServiceWorkerRegistration) {
50 visitor->trace(m_registration); 49 visitor->trace(m_registration);
51 visitor->trace(m_paymentAppManager); 50 visitor->trace(m_paymentAppManager);
52 Supplement<ServiceWorkerRegistration>::trace(visitor); 51 Supplement<ServiceWorkerRegistration>::trace(visitor);
53 } 52 }
54 53
55 PaymentAppServiceWorkerRegistration::PaymentAppServiceWorkerRegistration( 54 PaymentAppServiceWorkerRegistration::PaymentAppServiceWorkerRegistration(
56 ServiceWorkerRegistration* registration) 55 ServiceWorkerRegistration* registration)
57 : m_registration(registration) {} 56 : m_registration(registration) {}
58 57
59 // static 58 // static
60 const char* PaymentAppServiceWorkerRegistration::supplementName() { 59 const char* PaymentAppServiceWorkerRegistration::supplementName() {
61 return "PaymentAppServiceWorkerRegistration"; 60 return "PaymentAppServiceWorkerRegistration";
62 } 61 }
63 62
64 } // namespace blink 63 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/payments/PaymentAppManager.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698