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

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

Issue 2880133002: PaymentHandler: Should not allow accessing PaymentManager in Extension.
Patch Set: PaymentHandler: Should not allow accessing PaymentManager in Extension. Created 3 years, 7 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 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 #ifndef PaymentAppServiceWorkerRegistration_h 5 #ifndef PaymentAppServiceWorkerRegistration_h
6 #define PaymentAppServiceWorkerRegistration_h 6 #define PaymentAppServiceWorkerRegistration_h
7 7
8 #include "modules/serviceworkers/ServiceWorkerRegistration.h" 8 #include "modules/serviceworkers/ServiceWorkerRegistration.h"
9 #include "platform/Supplementable.h" 9 #include "platform/Supplementable.h"
10 #include "platform/heap/Handle.h" 10 #include "platform/heap/Handle.h"
11 11
12 namespace blink { 12 namespace blink {
13 13
14 class PaymentManager; 14 class PaymentManager;
15 class ScriptState; 15 class ScriptState;
16 class ServiceWorkerRegistration; 16 class ServiceWorkerRegistration;
17 17
18 class PaymentAppServiceWorkerRegistration final 18 class PaymentAppServiceWorkerRegistration final
19 : public GarbageCollectedFinalized<PaymentAppServiceWorkerRegistration>, 19 : public GarbageCollectedFinalized<PaymentAppServiceWorkerRegistration>,
20 public Supplement<ServiceWorkerRegistration> { 20 public Supplement<ServiceWorkerRegistration> {
21 USING_GARBAGE_COLLECTED_MIXIN(PaymentAppServiceWorkerRegistration); 21 USING_GARBAGE_COLLECTED_MIXIN(PaymentAppServiceWorkerRegistration);
22 WTF_MAKE_NONCOPYABLE(PaymentAppServiceWorkerRegistration); 22 WTF_MAKE_NONCOPYABLE(PaymentAppServiceWorkerRegistration);
23 23
24 public: 24 public:
25 virtual ~PaymentAppServiceWorkerRegistration(); 25 virtual ~PaymentAppServiceWorkerRegistration();
26 static PaymentAppServiceWorkerRegistration& From(ServiceWorkerRegistration&); 26 static PaymentAppServiceWorkerRegistration& From(ServiceWorkerRegistration&);
27 27
28 static PaymentManager* paymentManager(ScriptState*, 28 static PaymentManager* paymentManager(ScriptState*,
29 ServiceWorkerRegistration&); 29 ServiceWorkerRegistration&,
30 PaymentManager* paymentManager(ScriptState*); 30 ExceptionState&);
31 PaymentManager* paymentManager(ScriptState*, ExceptionState&);
31 32
32 DECLARE_VIRTUAL_TRACE(); 33 DECLARE_VIRTUAL_TRACE();
33 34
34 private: 35 private:
35 explicit PaymentAppServiceWorkerRegistration(ServiceWorkerRegistration*); 36 explicit PaymentAppServiceWorkerRegistration(ServiceWorkerRegistration*);
36 static const char* SupplementName(); 37 static const char* SupplementName();
37 38
38 Member<ServiceWorkerRegistration> registration_; 39 Member<ServiceWorkerRegistration> registration_;
39 Member<PaymentManager> payment_manager_; 40 Member<PaymentManager> payment_manager_;
40 }; 41 };
41 42
42 } // namespace blink 43 } // namespace blink
43 44
44 #endif // PaymentAppServiceWorkerRegistration_h 45 #endif // PaymentAppServiceWorkerRegistration_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698