| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_SERVICES_GCM_PUSH_MESSAGING_PERMISSION_CONTEXT_H_ | 5 #ifndef CHROME_BROWSER_SERVICES_GCM_PUSH_MESSAGING_PERMISSION_CONTEXT_H_ |
| 6 #define CHROME_BROWSER_SERVICES_GCM_PUSH_MESSAGING_PERMISSION_CONTEXT_H_ | 6 #define CHROME_BROWSER_SERVICES_GCM_PUSH_MESSAGING_PERMISSION_CONTEXT_H_ |
| 7 | 7 |
| 8 #include "chrome/browser/content_settings/permission_context_base.h" | 8 #include "chrome/browser/content_settings/permission_context_base.h" |
| 9 | 9 |
| 10 #include "components/content_settings/core/common/content_settings_types.h" | 10 #include "components/content_settings/core/common/content_settings_types.h" |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 private: | 40 private: |
| 41 FRIEND_TEST_ALL_PREFIXES(PushMessagingPermissionContextTest, | 41 FRIEND_TEST_ALL_PREFIXES(PushMessagingPermissionContextTest, |
| 42 DecidePushPermission); | 42 DecidePushPermission); |
| 43 | 43 |
| 44 // Used to decide the permission for push, once the permission for | 44 // Used to decide the permission for push, once the permission for |
| 45 // Notification has been granted/denied. | 45 // Notification has been granted/denied. |
| 46 void DecidePushPermission(const PermissionRequestID& id, | 46 void DecidePushPermission(const PermissionRequestID& id, |
| 47 const GURL& requesting_origin, | 47 const GURL& requesting_origin, |
| 48 const GURL& embedding_origin, | 48 const GURL& embedding_origin, |
| 49 const BrowserPermissionCallback& callback, | 49 const BrowserPermissionCallback& callback, |
| 50 bool notifications_permission_granted); | 50 ContentSetting notifications_content_setting); |
| 51 | 51 |
| 52 Profile* profile_; | 52 Profile* profile_; |
| 53 | 53 |
| 54 // Must be the last member, to ensure that it will be | 54 // Must be the last member, to ensure that it will be |
| 55 // destroyed first, which will invalidate weak pointers | 55 // destroyed first, which will invalidate weak pointers |
| 56 base::WeakPtrFactory<PushMessagingPermissionContext> weak_factory_ui_thread_; | 56 base::WeakPtrFactory<PushMessagingPermissionContext> weak_factory_ui_thread_; |
| 57 | 57 |
| 58 DISALLOW_COPY_AND_ASSIGN(PushMessagingPermissionContext); | 58 DISALLOW_COPY_AND_ASSIGN(PushMessagingPermissionContext); |
| 59 }; | 59 }; |
| 60 | 60 |
| 61 } // namespace gcm | 61 } // namespace gcm |
| 62 #endif // CHROME_BROWSER_SERVICES_GCM_PUSH_MESSAGING_PERMISSION_CONTEXT_H_ | 62 #endif // CHROME_BROWSER_SERVICES_GCM_PUSH_MESSAGING_PERMISSION_CONTEXT_H_ |
| OLD | NEW |