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

Unified Diff: chrome/browser/permissions/permission_manager.cc

Issue 2946013002: PaymentHandler: Implement requestPermission().
Patch Set: PaymentHandler: Implement requestPermission(). Created 3 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/permissions/permission_manager.cc
diff --git a/chrome/browser/permissions/permission_manager.cc b/chrome/browser/permissions/permission_manager.cc
index 5f205178591939e9455d83bf4ca505034c7557e6..d06905f727eebb0444d2c491eb435e6f2741f22d 100644
--- a/chrome/browser/permissions/permission_manager.cc
+++ b/chrome/browser/permissions/permission_manager.cc
@@ -16,6 +16,7 @@
#include "chrome/browser/media/midi_sysex_permission_context.h"
#include "chrome/browser/media/webrtc/media_stream_device_permission_context.h"
#include "chrome/browser/notifications/notification_permission_context.h"
+#include "chrome/browser/payments/payment_handler_permission_context.h"
#include "chrome/browser/permissions/permission_context_base.h"
#include "chrome/browser/permissions/permission_manager_factory.h"
#include "chrome/browser/permissions/permission_request_id.h"
@@ -107,6 +108,8 @@ ContentSettingsType PermissionTypeToContentSetting(PermissionType permission) {
return CONTENT_SETTINGS_TYPE_BACKGROUND_SYNC;
case PermissionType::FLASH:
return CONTENT_SETTINGS_TYPE_PLUGINS;
+ case PermissionType::PAYMENT_HANDLER:
+ return CONTENT_SETTINGS_TYPE_PAYMENT_HANDLER;
case PermissionType::NUM:
// This will hit the NOTREACHED below.
break;
@@ -243,6 +246,8 @@ PermissionManager::PermissionManager(Profile* profile)
profile, CONTENT_SETTINGS_TYPE_MEDIASTREAM_CAMERA);
permission_contexts_[CONTENT_SETTINGS_TYPE_BACKGROUND_SYNC] =
base::MakeUnique<BackgroundSyncPermissionContext>(profile);
+ permission_contexts_[CONTENT_SETTINGS_TYPE_PAYMENT_HANDLER] =
+ base::MakeUnique<payments::PaymentHandlerPermissionContext>(profile);
#if BUILDFLAG(ENABLE_PLUGINS)
permission_contexts_[CONTENT_SETTINGS_TYPE_PLUGINS] =
base::MakeUnique<FlashPermissionContext>(profile);
« no previous file with comments | « chrome/browser/permissions/permission_infobar_delegate.cc ('k') | chrome/browser/permissions/permission_request_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698