Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROME_BROWSER_PERMISSIONS_CHOOSER_PERMISSION_CONTEXT_BASE_H_ | |
| 6 #define CHROME_BROWSER_PERMISSIONS_CHOOSER_PERMISSION_CONTEXT_BASE_H_ | |
| 7 | |
| 8 #include "base/memory/scoped_ptr.h" | |
| 9 #include "components/content_settings/core/common/content_settings_types.h" | |
| 10 #include "components/keyed_service/core/keyed_service.h" | |
| 11 | |
| 12 namespace base { | |
| 13 class DictionaryValue; | |
| 14 class ListValue; | |
| 15 class Value; | |
| 16 } | |
| 17 | |
| 18 namespace content { | |
| 19 enum class PermissionType; | |
| 20 }; | |
|
Bernhard Bauer
2015/10/12 11:03:48
No semicolon.
Reilly Grant (use Gerrit)
2015/10/13 01:32:24
Done.
| |
| 21 | |
| 22 class GURL; | |
| 23 class Profile; | |
| 24 | |
| 25 class ChooserPermissionContextBase : public KeyedService { | |
| 26 public: | |
| 27 ChooserPermissionContextBase(Profile* profile, | |
| 28 content::PermissionType permission_type, | |
| 29 ContentSettingsType chooser_settings_type); | |
| 30 ~ChooserPermissionContextBase() override; | |
| 31 | |
| 32 scoped_ptr<base::ListValue> GetPreviouslyChosenObjects( | |
| 33 const GURL& requesting_origin, | |
| 34 const GURL& embedding_origin); | |
| 35 void GrantObjectPermission(const GURL& requesting_origin, | |
| 36 const GURL& embedding_origin, | |
| 37 scoped_ptr<base::Value> object); | |
| 38 void RevokeObjectPermission(const GURL& requesting_origin, | |
| 39 const GURL& embedding_origin, | |
| 40 const base::Value& object); | |
| 41 | |
| 42 private: | |
| 43 scoped_ptr<base::DictionaryValue> GetWebsiteSetting( | |
| 44 const GURL& requesting_origin, | |
| 45 const GURL& embedding_origin); | |
| 46 void SetWebsiteSetting(const GURL& requesting_origin, | |
| 47 const GURL& embedding_origin, | |
| 48 scoped_ptr<base::Value> value); | |
| 49 | |
| 50 Profile* const profile_; | |
| 51 const content::PermissionType permission_type_; | |
| 52 const ContentSettingsType chooser_settings_type_; | |
| 53 }; | |
| 54 | |
| 55 #endif // CHROME_BROWSER_PERMISSIONS_CHOOSER_PERMISSION_CONTEXT_BASE_H_ | |
| OLD | NEW |