OLD | NEW |
(Empty) | |
| 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. |
| 4 |
| 5 #ifndef CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_PERMISSION_CONTEXT_H_ |
| 6 #define CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_PERMISSION_CONTEXT_H_ |
| 7 |
| 8 #include "chrome/browser/content_settings/permission_context_base.h" |
| 9 #include "components/content_settings/core/common/content_settings.h" |
| 10 |
| 11 class GURL; |
| 12 class Profile; |
| 13 |
| 14 class NotificationPermissionContext : public PermissionContextBase { |
| 15 public: |
| 16 explicit NotificationPermissionContext(Profile* profile); |
| 17 ~NotificationPermissionContext() override; |
| 18 |
| 19 // PermissionContextBase implementation. |
| 20 void ResetPermission(const GURL& requesting_origin, |
| 21 const GURL& embedder_origin) override; |
| 22 |
| 23 private: |
| 24 FRIEND_TEST_ALL_PREFIXES(NotificationPermissionContextTest, |
| 25 IgnoresEmbedderOrigin); |
| 26 FRIEND_TEST_ALL_PREFIXES(NotificationPermissionContextTest, |
| 27 NoSecureOriginRequirement); |
| 28 |
| 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; |
| 34 }; |
| 35 |
| 36 #endif // CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_PERMISSION_CONTEXT_H_ |
OLD | NEW |