| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 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 CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_PERMISSION_CONTEXT_H_ | 5 #ifndef CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_PERMISSION_CONTEXT_H_ |
| 6 #define CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_PERMISSION_CONTEXT_H_ | 6 #define CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_PERMISSION_CONTEXT_H_ |
| 7 | 7 |
| 8 #include "base/gtest_prod_util.h" | 8 #include "base/gtest_prod_util.h" |
| 9 #include "chrome/browser/permissions/permission_context_base.h" | 9 #include "chrome/browser/permissions/permission_context_base.h" |
| 10 #include "components/content_settings/core/common/content_settings.h" | 10 #include "components/content_settings/core/common/content_settings.h" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 FRIEND_TEST_ALL_PREFIXES(NotificationPermissionContextTest, | 27 FRIEND_TEST_ALL_PREFIXES(NotificationPermissionContextTest, |
| 28 IgnoresEmbedderOrigin); | 28 IgnoresEmbedderOrigin); |
| 29 FRIEND_TEST_ALL_PREFIXES(NotificationPermissionContextTest, | 29 FRIEND_TEST_ALL_PREFIXES(NotificationPermissionContextTest, |
| 30 NoSecureOriginRequirement); | 30 NoSecureOriginRequirement); |
| 31 | 31 |
| 32 // PermissionContextBase implementation. | 32 // PermissionContextBase implementation. |
| 33 void DecidePermission(content::WebContents* web_contents, | 33 void DecidePermission(content::WebContents* web_contents, |
| 34 const PermissionRequestID& id, | 34 const PermissionRequestID& id, |
| 35 const GURL& requesting_origin, | 35 const GURL& requesting_origin, |
| 36 const GURL& embedding_origin, | 36 const GURL& embedding_origin, |
| 37 bool user_gesture, |
| 37 const BrowserPermissionCallback& callback) override; | 38 const BrowserPermissionCallback& callback) override; |
| 38 void UpdateContentSetting(const GURL& requesting_origin, | 39 void UpdateContentSetting(const GURL& requesting_origin, |
| 39 const GURL& embedder_origin, | 40 const GURL& embedder_origin, |
| 40 ContentSetting content_setting) override; | 41 ContentSetting content_setting) override; |
| 41 bool IsRestrictedToSecureOrigins() const override; | 42 bool IsRestrictedToSecureOrigins() const override; |
| 42 | 43 |
| 43 base::WeakPtrFactory<NotificationPermissionContext> weak_factory_ui_thread_; | 44 base::WeakPtrFactory<NotificationPermissionContext> weak_factory_ui_thread_; |
| 44 }; | 45 }; |
| 45 | 46 |
| 46 #endif // CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_PERMISSION_CONTEXT_H_ | 47 #endif // CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_PERMISSION_CONTEXT_H_ |
| OLD | NEW |