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

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

Issue 7831075: Delegating the "are images allowed" decision to renderer. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Transmit image settings to the renderer. Draft. Created 9 years, 3 months 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
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 // Interface for objects providing content setting rules. 5 // Interface for objects providing content setting rules.
6 6
7 #ifndef CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_PROVIDER_H_ 7 #ifndef CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_PROVIDER_H_
8 #define CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_PROVIDER_H_ 8 #define CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_PROVIDER_H_
9 #pragma once 9 #pragma once
10 10
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 virtual void ShutdownOnUIThread() = 0; 47 virtual void ShutdownOnUIThread() = 0;
48 }; 48 };
49 49
50 class ProviderInterface { 50 class ProviderInterface {
51 public: 51 public:
52 struct Rule { 52 struct Rule {
53 Rule(); 53 Rule();
54 Rule(const ContentSettingsPattern& primary_pattern, 54 Rule(const ContentSettingsPattern& primary_pattern,
55 const ContentSettingsPattern& secondary_pattern, 55 const ContentSettingsPattern& secondary_pattern,
56 ContentSetting setting); 56 ContentSetting setting);
57 bool operator<(const Rule& rhs) const;
57 58
58 ContentSettingsPattern primary_pattern; 59 ContentSettingsPattern primary_pattern;
59 ContentSettingsPattern secondary_pattern; 60 ContentSettingsPattern secondary_pattern;
60 ContentSetting content_setting; 61 ContentSetting content_setting;
61 }; 62 };
62 63
63 typedef std::vector<Rule> Rules; 64 typedef std::vector<Rule> Rules;
64 65
65 virtual ~ProviderInterface() {} 66 virtual ~ProviderInterface() {}
66 67
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 // Detaches the Provider from all Profile-related objects like PrefService. 133 // Detaches the Provider from all Profile-related objects like PrefService.
133 // This methods needs to be called before destroying the Profile. 134 // This methods needs to be called before destroying the Profile.
134 // Afterwards, none of the methods above that should only be called on the UI 135 // Afterwards, none of the methods above that should only be called on the UI
135 // thread should be called anymore. 136 // thread should be called anymore.
136 virtual void ShutdownOnUIThread() = 0; 137 virtual void ShutdownOnUIThread() = 0;
137 }; 138 };
138 139
139 } // namespace content_settings 140 } // namespace content_settings
140 141
141 #endif // CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_PROVIDER_H_ 142 #endif // CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_PROVIDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698