1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_PERMISSION_CONTEXT_H_
6 #define CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_PERMISSION_CONTEXT_H_
8 #include "chrome/browser/permissions/permission_context_base.h"
9 #include "components/content_settings/core/common/content_settings.h"
14 class NotificationPermissionContext
: public PermissionContextBase
{
16 explicit NotificationPermissionContext(Profile
* profile
);
17 ~NotificationPermissionContext() override
;
19 // PermissionContextBase implementation.
20 void ResetPermission(const GURL
& requesting_origin
,
21 const GURL
& embedder_origin
) override
;
24 FRIEND_TEST_ALL_PREFIXES(NotificationPermissionContextTest
,
25 IgnoresEmbedderOrigin
);
26 FRIEND_TEST_ALL_PREFIXES(NotificationPermissionContextTest
,
27 NoSecureOriginRequirement
);
29 // PermissionContextBase implementation.
30 void UpdateContentSetting(const GURL
& requesting_origin
,
31 const GURL
& embedder_origin
,
32 ContentSetting content_setting
) override
;
33 bool IsRestrictedToSecureOrigins() const override
;
36 #endif // CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_PERMISSION_CONTEXT_H_