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_CONTEXT_H_ |
| 6 #define CHROME_BROWSER_PERMISSIONS_CHOOSER_CONTEXT_H_ |
| 7 |
| 8 #include <list> |
| 9 |
| 10 #include "base/macros.h" |
| 11 #include "components/content_settings/core/common/content_settings_types.h" |
| 12 |
| 13 class ChooserContextBase; |
| 14 enum class ChooserType; |
| 15 class Profile; |
| 16 class KeyedServiceBaseFactory; |
| 17 |
| 18 class ChooserContext { |
| 19 public: |
| 20 // Helper method returning the ChooserContextBase object associated with the |
| 21 // given ContentSettingsType. This can return nullptr if the the permission |
| 22 // type has no associated context. |
| 23 static ChooserContextBase* Get(Profile* profile, |
| 24 ChooserType content_settings_type); |
| 25 |
| 26 // Return all the factories related to ChooserContext. These are the factories |
| 27 // used by ::Get() to create a ChooserContextBase. This is meant to be used by |
| 28 // callers of ::Get() that need to depend on these factories. |
| 29 static const std::list<KeyedServiceBaseFactory*>& GetFactories(); |
| 30 |
| 31 private: |
| 32 DISALLOW_IMPLICIT_CONSTRUCTORS(ChooserContext); |
| 33 }; |
| 34 |
| 35 #endif // CHROME_BROWSER_PERMISSIONS_CHOOSER_CONTEXT_H_ |
OLD | NEW |