diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2018-05-03 13:42:47 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2018-05-15 10:27:51 +0000 |
commit | 8c5c43c7b138c9b4b0bf56d946e61d3bbc111bec (patch) | |
tree | d29d987c4d7b173cf853279b79a51598f104b403 /chromium/content/browser/payments/payment_app_installer.h | |
parent | 830c9e163d31a9180fadca926b3e1d7dfffb5021 (diff) | |
download | qtwebengine-chromium-8c5c43c7b138c9b4b0bf56d946e61d3bbc111bec.tar.gz |
BASELINE: Update Chromium to 66.0.3359.156
Change-Id: I0c9831ad39911a086b6377b16f995ad75a51e441
Reviewed-by: Michal Klocek <michal.klocek@qt.io>
Diffstat (limited to 'chromium/content/browser/payments/payment_app_installer.h')
-rw-r--r-- | chromium/content/browser/payments/payment_app_installer.h | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/chromium/content/browser/payments/payment_app_installer.h b/chromium/content/browser/payments/payment_app_installer.h new file mode 100644 index 00000000000..e864c970c6a --- /dev/null +++ b/chromium/content/browser/payments/payment_app_installer.h @@ -0,0 +1,49 @@ +// Copyright 2018 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef CONTENT_BROWSER_PAYMENTS_PAYMENT_APP_INSTALLER_H_ +#define CONTENT_BROWSER_PAYMENTS_PAYMENT_APP_INSTALLER_H_ + +#include <vector> + +#include "base/callback.h" +#include "base/macros.h" + +class GURL; + +namespace content { + +class BrowserContext; +class WebContents; + +// Installs a web payment app with a default payment instrument and returns +// the registration Id through callback on success. +class PaymentAppInstaller { + public: + using InstallPaymentAppCallback = + base::OnceCallback<void(BrowserContext* browser_context, + long registration_id)>; + + // Installs the payment app. + // |app_name| is the name of the payment app. + // |sw_url| is the url to get the service worker js script. + // |scope| is the registration scope. + // |use_cache| indicates whether to use cache. + // |enabled_methods| are the enabled methods of the app. + // |callback| to send back registeration result. + static void Install(WebContents* web_contents, + const std::string& app_name, + const GURL& sw_url, + const GURL& scope, + bool use_cache, + const std::vector<std::string>& enabled_methods, + InstallPaymentAppCallback callback); + + private: + DISALLOW_IMPLICIT_CONSTRUCTORS(PaymentAppInstaller); +}; + +} // namespace content. + +#endif // CONTENT_BROWSER_PAYMENTS_PAYMENT_APP_INSTALLER_H_
\ No newline at end of file |