Chromium Code Reviews| Index: chrome/browser/content_settings/content_settings_provider.h |
| diff --git a/chrome/browser/content_settings/content_settings_provider.h b/chrome/browser/content_settings/content_settings_provider.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..9a828fd2f14ba14abad8defcacf3ed290b314324 |
| --- /dev/null |
| +++ b/chrome/browser/content_settings/content_settings_provider.h |
| @@ -0,0 +1,38 @@ |
| +// Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +// Interface for objects providing content setting rules. |
| + |
| +#ifndef CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_PROVIDER_H_ |
| +#define CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_PROVIDER_H_ |
| +#pragma once |
| + |
| +#include "chrome/common/content_settings.h" |
| + |
| +class ContentSettingsProviderInterface { |
| + public: |
| + // True if this provider can provide a default setting for the |content_type|. |
| + virtual bool canProvideDefaultSetting(ContentSettingsType content_type) = 0; |
|
gfeher
2010/11/30 12:20:59
I think the style guide asks for capital letters a
jochen (gone - plz use gerrit)
2010/11/30 12:29:10
Done.
|
| + |
| + // Returns the default content setting this provider has for the given |
| + // |content_type|, or CONTENT_SETTING_DEFAULT if nothing be provided for this |
| + // type. |
| + virtual ContentSetting provideDefaultSetting( |
| + ContentSettingsType content_type) = 0; |
| + |
| + // Notifies the provider that the host content settings map would like to |
| + // update the default setting for the given |content_type|. The provider may |
| + // ignore this. |
| + virtual void updateDefaultSetting(ContentSettingsType content_type, |
| + ContentSetting setting) = 0; |
| + |
| + // True if the default setting for the |content_type| is policy managed, i.e., |
| + // there shouldn't be any UI shown to modify this setting. |
| + virtual bool defaultSettingIsManaged(ContentSettingsType content_type) = 0; |
| + |
| + protected: |
| + virtual ~ContentSettingsProviderInterface() {}; |
| +}; |
| + |
| +#endif // CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_PROVIDER_H_ |