Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(113)

Side by Side Diff: chrome/browser/content_settings/content_settings_provider.h

Issue 5269007: Introduce a content settings provider interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/chrome/browser/content_settings
Patch Set: rebase Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2010 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 // Interface for objects providing content setting rules.
6
7 #ifndef CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_PROVIDER_H_
8 #define CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_PROVIDER_H_
9 #pragma once
10
11 #include "chrome/common/content_settings.h"
12
13 class ContentSettingsProviderInterface {
14 public:
15 // True if this provider can provide a default setting for the |content_type|.
16 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.
17
18 // Returns the default content setting this provider has for the given
19 // |content_type|, or CONTENT_SETTING_DEFAULT if nothing be provided for this
20 // type.
21 virtual ContentSetting provideDefaultSetting(
22 ContentSettingsType content_type) = 0;
23
24 // Notifies the provider that the host content settings map would like to
25 // update the default setting for the given |content_type|. The provider may
26 // ignore this.
27 virtual void updateDefaultSetting(ContentSettingsType content_type,
28 ContentSetting setting) = 0;
29
30 // True if the default setting for the |content_type| is policy managed, i.e.,
31 // there shouldn't be any UI shown to modify this setting.
32 virtual bool defaultSettingIsManaged(ContentSettingsType content_type) = 0;
33
34 protected:
35 virtual ~ContentSettingsProviderInterface() {};
36 };
37
38 #endif // CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_PROVIDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698