OLD | NEW |
1 // Copyright 2014 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_SERVICES_GCM_PUSH_MESSAGING_PERMISSION_CONTEXT_H_ | 5 #ifndef CHROME_BROWSER_PUSH_MESSAGING_PUSH_MESSAGING_PERMISSION_CONTEXT_H_ |
6 #define CHROME_BROWSER_SERVICES_GCM_PUSH_MESSAGING_PERMISSION_CONTEXT_H_ | 6 #define CHROME_BROWSER_PUSH_MESSAGING_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" |
11 | 11 |
12 class PermissionRequestID; | 12 class PermissionRequestID; |
13 class Profile; | 13 class Profile; |
14 | 14 |
15 namespace gcm { | |
16 | |
17 // Permission context for push messages. | 15 // Permission context for push messages. |
18 class PushMessagingPermissionContext : public PermissionContextBase { | 16 class PushMessagingPermissionContext : public PermissionContextBase { |
19 public: | 17 public: |
20 explicit PushMessagingPermissionContext(Profile* profile); | 18 explicit PushMessagingPermissionContext(Profile* profile); |
21 ~PushMessagingPermissionContext() override; | 19 ~PushMessagingPermissionContext() override; |
22 | 20 |
23 // PermissionContextBase: | 21 // PermissionContextBase: |
24 ContentSetting GetPermissionStatus( | 22 ContentSetting GetPermissionStatus( |
25 const GURL& requesting_origin, | 23 const GURL& requesting_origin, |
26 const GURL& embedding_origin) const override; | 24 const GURL& embedding_origin) const override; |
(...skipping 24 matching lines...) Expand all Loading... |
51 | 49 |
52 Profile* profile_; | 50 Profile* profile_; |
53 | 51 |
54 // Must be the last member, to ensure that it will be | 52 // Must be the last member, to ensure that it will be |
55 // destroyed first, which will invalidate weak pointers | 53 // destroyed first, which will invalidate weak pointers |
56 base::WeakPtrFactory<PushMessagingPermissionContext> weak_factory_ui_thread_; | 54 base::WeakPtrFactory<PushMessagingPermissionContext> weak_factory_ui_thread_; |
57 | 55 |
58 DISALLOW_COPY_AND_ASSIGN(PushMessagingPermissionContext); | 56 DISALLOW_COPY_AND_ASSIGN(PushMessagingPermissionContext); |
59 }; | 57 }; |
60 | 58 |
61 } // namespace gcm | 59 #endif // CHROME_BROWSER_PUSH_MESSAGING_PUSH_MESSAGING_PERMISSION_CONTEXT_H_ |
62 #endif // CHROME_BROWSER_SERVICES_GCM_PUSH_MESSAGING_PERMISSION_CONTEXT_H_ | |
OLD | NEW |