| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef CHROME_BROWSER_PLUGIN_PREFS_H_ | 5 #ifndef CHROME_BROWSER_PLUGIN_PREFS_H_ |
| 6 #define CHROME_BROWSER_PLUGIN_PREFS_H_ | 6 #define CHROME_BROWSER_PLUGIN_PREFS_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 static void EnablePluginGlobally(bool enable, const FilePath& file_path, | 85 static void EnablePluginGlobally(bool enable, const FilePath& file_path, |
| 86 const base::Closure& callback); | 86 const base::Closure& callback); |
| 87 | 87 |
| 88 // Returns whether there is a policy enabling or disabling plug-ins of the | 88 // Returns whether there is a policy enabling or disabling plug-ins of the |
| 89 // given name. | 89 // given name. |
| 90 PolicyStatus PolicyStatusForPlugin(const string16& name) const; | 90 PolicyStatus PolicyStatusForPlugin(const string16& name) const; |
| 91 | 91 |
| 92 // Returns whether the plugin is enabled or not. | 92 // Returns whether the plugin is enabled or not. |
| 93 bool IsPluginEnabled(const webkit::WebPluginInfo& plugin) const; | 93 bool IsPluginEnabled(const webkit::WebPluginInfo& plugin) const; |
| 94 | 94 |
| 95 // Registers the preferences used by this class. | |
| 96 // This method should only be called on the UI thread. | |
| 97 static void RegisterPrefs(PrefService* prefs); | |
| 98 | |
| 99 void set_profile(Profile* profile) { profile_ = profile; } | 95 void set_profile(Profile* profile) { profile_ = profile; } |
| 100 | 96 |
| 101 // RefCountedProfileKeyedBase method override. | 97 // RefCountedProfileKeyedBase method override. |
| 102 virtual void ShutdownOnUIThread() OVERRIDE; | 98 virtual void ShutdownOnUIThread() OVERRIDE; |
| 103 | 99 |
| 104 // content::NotificationObserver method override. | 100 // content::NotificationObserver method override. |
| 105 virtual void Observe(int type, | 101 virtual void Observe(int type, |
| 106 const content::NotificationSource& source, | 102 const content::NotificationSource& source, |
| 107 const content::NotificationDetails& details) OVERRIDE; | 103 const content::NotificationDetails& details) OVERRIDE; |
| 108 | 104 |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 // PluginList to use for testing. If this is NULL, defaults to the global | 165 // PluginList to use for testing. If this is NULL, defaults to the global |
| 170 // singleton. | 166 // singleton. |
| 171 webkit::npapi::PluginList* plugin_list_; | 167 webkit::npapi::PluginList* plugin_list_; |
| 172 | 168 |
| 173 PrefChangeRegistrar registrar_; | 169 PrefChangeRegistrar registrar_; |
| 174 | 170 |
| 175 DISALLOW_COPY_AND_ASSIGN(PluginPrefs); | 171 DISALLOW_COPY_AND_ASSIGN(PluginPrefs); |
| 176 }; | 172 }; |
| 177 | 173 |
| 178 #endif // CHROME_BROWSER_PLUGIN_PREFS_H_ | 174 #endif // CHROME_BROWSER_PLUGIN_PREFS_H_ |
| OLD | NEW |