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" | |
11 | |
12 class Profile; | |
13 | |
10 namespace gcm { | 14 namespace gcm { |
11 | 15 |
12 // Permission context for push messages. | 16 // Permission context for push messages. |
13 class PushMessagingPermissionContext : public PermissionContextBase { | 17 class PushMessagingPermissionContext : public PermissionContextBase { |
14 public: | 18 public: |
15 explicit PushMessagingPermissionContext(Profile* profile); | 19 explicit PushMessagingPermissionContext(Profile* profile); |
16 ~PushMessagingPermissionContext() override; | 20 ~PushMessagingPermissionContext() override; |
17 | 21 |
22 // PermissionContextBase: | |
23 ContentSetting GetPermissionStatus( | |
24 const GURL& requesting_origin, | |
25 const GURL& embedding_origin) const override; | |
26 | |
27 protected: | |
28 // PermissionContextBase: | |
29 void DecidePermission(content::WebContents* web_contents, | |
30 const PermissionRequestID& id, | |
31 const GURL& requesting_origin, | |
32 const GURL& embedding_origin, | |
33 bool user_gesture, | |
34 const BrowserPermissionCallback& callback) override; | |
35 | |
18 private: | 36 private: |
37 Profile* push_profile_; | |
Michael van Ouwerkerk
2014/11/17 14:50:09
Can you not call this |profile_| ?
Miguel Garcia
2014/11/18 10:47:30
Done.
| |
38 | |
19 DISALLOW_COPY_AND_ASSIGN(PushMessagingPermissionContext); | 39 DISALLOW_COPY_AND_ASSIGN(PushMessagingPermissionContext); |
20 }; | 40 }; |
21 | 41 |
22 } // namespace gcm | 42 } // namespace gcm |
23 #endif // CHROME_BROWSER_SERVICES_GCM_PUSH_MESSAGING_PERMISSION_CONTEXT_H_ | 43 #endif // CHROME_BROWSER_SERVICES_GCM_PUSH_MESSAGING_PERMISSION_CONTEXT_H_ |
OLD | NEW |