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

Side by Side Diff: content/browser/payments/payment_app_manager.h

Issue 2556433002: PaymentApp: Implement GetAllManifests() in PaymentAppContext. (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
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 CONTENT_BROWSER_PAYMENTS_PAYMENT_APP_MANAGER_H_ 5 #ifndef CONTENT_BROWSER_PAYMENTS_PAYMENT_APP_MANAGER_H_
6 #define CONTENT_BROWSER_PAYMENTS_PAYMENT_APP_MANAGER_H_ 6 #define CONTENT_BROWSER_PAYMENTS_PAYMENT_APP_MANAGER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "base/memory/weak_ptr.h" 11 #include "base/memory/weak_ptr.h"
12 #include "components/payments/payment_app.mojom.h" 12 #include "components/payments/payment_app.mojom.h"
13 #include "content/common/content_export.h" 13 #include "content/common/content_export.h"
14 #include "mojo/public/cpp/bindings/binding.h" 14 #include "mojo/public/cpp/bindings/binding.h"
15 15
16 namespace content { 16 namespace content {
17 17
18 class PaymentAppContextImpl; 18 class PaymentAppContextImpl;
19 19
20 class CONTENT_EXPORT PaymentAppManager 20 class CONTENT_EXPORT PaymentAppManager
21 : public NON_EXPORTED_BASE(payments::mojom::PaymentAppManager) { 21 : public NON_EXPORTED_BASE(payments::mojom::PaymentAppManager) {
22 public: 22 public:
23 PaymentAppManager( 23 PaymentAppManager(
24 PaymentAppContextImpl* payment_app_context, 24 PaymentAppContextImpl* payment_app_context,
25 mojo::InterfaceRequest<payments::mojom::PaymentAppManager> request); 25 mojo::InterfaceRequest<payments::mojom::PaymentAppManager> request);
26 26
27 ~PaymentAppManager() override; 27 ~PaymentAppManager() override;
28 28
29 private: 29 private:
30 friend class PaymentAppContentUnitTestBase;
30 friend class PaymentAppManagerTest; 31 friend class PaymentAppManagerTest;
31 32
32 // payments::mojom::PaymentAppManager methods: 33 // payments::mojom::PaymentAppManager methods:
33 void SetManifest(const std::string& scope, 34 void SetManifest(const std::string& scope,
34 payments::mojom::PaymentAppManifestPtr manifest, 35 payments::mojom::PaymentAppManifestPtr manifest,
35 const SetManifestCallback& callback) override; 36 const SetManifestCallback& callback) override;
36 void GetManifest(const std::string& scope, 37 void GetManifest(const std::string& scope,
37 const GetManifestCallback& callback) override; 38 const GetManifestCallback& callback) override;
38 39
39 // Called when an error is detected on binding_. 40 // Called when an error is detected on binding_.
40 void OnConnectionError(); 41 void OnConnectionError();
41 42
42 // PaymentAppContextImpl owns PaymentAppManager 43 // PaymentAppContextImpl owns PaymentAppManager
43 PaymentAppContextImpl* payment_app_context_; 44 PaymentAppContextImpl* payment_app_context_;
44 45
45 mojo::Binding<payments::mojom::PaymentAppManager> binding_; 46 mojo::Binding<payments::mojom::PaymentAppManager> binding_;
46 47
47 base::WeakPtrFactory<PaymentAppManager> weak_ptr_factory_; 48 base::WeakPtrFactory<PaymentAppManager> weak_ptr_factory_;
48 49
49 DISALLOW_COPY_AND_ASSIGN(PaymentAppManager); 50 DISALLOW_COPY_AND_ASSIGN(PaymentAppManager);
50 }; 51 };
51 52
52 } // namespace content 53 } // namespace content
53 54
54 #endif // CONTENT_BROWSER_PAYMENTS_PAYMENT_APP_MANAGER_H_ 55 #endif // CONTENT_BROWSER_PAYMENTS_PAYMENT_APP_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698