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 10 matching lines...) Expand all Loading... | |
21 void ResetPermission(const GURL& requesting_origin, | 21 void ResetPermission(const GURL& requesting_origin, |
22 const GURL& embedder_origin) override; | 22 const GURL& embedder_origin) override; |
23 | 23 |
24 private: | 24 private: |
25 FRIEND_TEST_ALL_PREFIXES(NotificationPermissionContextTest, | 25 FRIEND_TEST_ALL_PREFIXES(NotificationPermissionContextTest, |
26 IgnoresEmbedderOrigin); | 26 IgnoresEmbedderOrigin); |
27 FRIEND_TEST_ALL_PREFIXES(NotificationPermissionContextTest, | 27 FRIEND_TEST_ALL_PREFIXES(NotificationPermissionContextTest, |
28 NoSecureOriginRequirement); | 28 NoSecureOriginRequirement); |
29 | 29 |
30 // PermissionContextBase implementation. | 30 // PermissionContextBase implementation. |
31 void DecidePermission(content::WebContents* web_contents, | |
32 const PermissionRequestID& id, | |
33 const GURL& requesting_origin, | |
34 const GURL& embedding_origin, | |
35 bool user_gesture, | |
36 const BrowserPermissionCallback& callback) override; | |
31 void UpdateContentSetting(const GURL& requesting_origin, | 37 void UpdateContentSetting(const GURL& requesting_origin, |
32 const GURL& embedder_origin, | 38 const GURL& embedder_origin, |
33 ContentSetting content_setting) override; | 39 ContentSetting content_setting) override; |
34 bool IsRestrictedToSecureOrigins() const override; | 40 bool IsRestrictedToSecureOrigins() const override; |
41 | |
42 // Must be the last member, to ensure that it will be | |
43 // destroyed first, which will invalidate weak pointers | |
Peter Beverloo
2016/01/13 01:42:10
No need for this documentation, it's always the ca
johnme
2016/01/13 20:49:26
Done (cool, didn't know about the clang plugin).
| |
44 base::WeakPtrFactory<NotificationPermissionContext> weak_factory_ui_thread_; | |
35 }; | 45 }; |
36 | 46 |
37 #endif // CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_PERMISSION_CONTEXT_H_ | 47 #endif // CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_PERMISSION_CONTEXT_H_ |
OLD | NEW |