| 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_PLUGINS_PLUGIN_PREFS_H_ | 5 #ifndef CHROME_BROWSER_PLUGINS_PLUGIN_PREFS_H_ |
| 6 #define CHROME_BROWSER_PLUGINS_PLUGIN_PREFS_H_ | 6 #define CHROME_BROWSER_PLUGINS_PLUGIN_PREFS_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 // some plugins in sync with each other. | 92 // some plugins in sync with each other. |
| 93 class PluginState { | 93 class PluginState { |
| 94 public: | 94 public: |
| 95 PluginState(); | 95 PluginState(); |
| 96 ~PluginState(); | 96 ~PluginState(); |
| 97 | 97 |
| 98 // Returns whether |plugin| is found. If |plugin| cannot be found, | 98 // Returns whether |plugin| is found. If |plugin| cannot be found, |
| 99 // |*enabled| won't be touched. | 99 // |*enabled| won't be touched. |
| 100 bool Get(const FilePath& plugin, bool* enabled) const; | 100 bool Get(const FilePath& plugin, bool* enabled) const; |
| 101 void Set(const FilePath& plugin, bool enabled); | 101 void Set(const FilePath& plugin, bool enabled); |
| 102 // It is similar to Set(), except that it does nothing if |plugin| needs to | |
| 103 // be converted to a different key. | |
| 104 void SetIgnorePseudoKey(const FilePath& plugin, bool enabled); | |
| 105 | 102 |
| 106 private: | 103 private: |
| 107 FilePath ConvertMapKey(const FilePath& plugin) const; | 104 FilePath ConvertMapKey(const FilePath& plugin) const; |
| 108 | 105 |
| 109 std::map<FilePath, bool> state_; | 106 std::map<FilePath, bool> state_; |
| 110 }; | 107 }; |
| 111 | 108 |
| 112 virtual ~PluginPrefs(); | 109 virtual ~PluginPrefs(); |
| 113 | 110 |
| 114 // Called to update one of the policy_xyz patterns below when a | 111 // Called to update one of the policy_xyz patterns below when a |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 // PluginList to use for testing. If this is NULL, defaults to the global | 170 // PluginList to use for testing. If this is NULL, defaults to the global |
| 174 // singleton. | 171 // singleton. |
| 175 webkit::npapi::PluginList* plugin_list_; | 172 webkit::npapi::PluginList* plugin_list_; |
| 176 | 173 |
| 177 PrefChangeRegistrar registrar_; | 174 PrefChangeRegistrar registrar_; |
| 178 | 175 |
| 179 DISALLOW_COPY_AND_ASSIGN(PluginPrefs); | 176 DISALLOW_COPY_AND_ASSIGN(PluginPrefs); |
| 180 }; | 177 }; |
| 181 | 178 |
| 182 #endif // CHROME_BROWSER_PLUGINS_PLUGIN_PREFS_H_ | 179 #endif // CHROME_BROWSER_PLUGINS_PLUGIN_PREFS_H_ |
| OLD | NEW |